firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Remote Config not producing throttling error accurately

Open aj2109 opened this issue 1 year ago • 40 comments

Description

In trying to add non fatal logging specifically for throttling I have discovered what appears to be a bug. Whilst the error status of the connection is 429, as shown in the logs, and the catch let error as RemoteConfig hitting, its error code is never that of throttling (8002), its always internal errors code (8003). (minimumFetchInterval = 0 seconds btw)

Thanks!

Reproducing the issue

func forceThrottle() async {
        let RemoteConfig = RemoteConfig.remoteConfg()
       do {
       for i in 0...1000 {
          let foo = try await remoteConfig.fetchAndActivate()
       }
       } catch let error as RemoteConfigError {
       //prints false
           print("Error code is correct: \(error.code == .throttled)")
       } catch {}
}

Firebase SDK Version

10.21.0

Xcode Version

15.2

Installation Method

Swift Package Manager

Firebase Product(s)

AB Testing, Analytics, App Distribution, Crashlytics, Performance, Remote Config

Targeted Platforms

iOS

Relevant Log Output

10.21.0 - [FirebaseRemoteConfig][I-RCN000026] RCN fetch failure. Response http error code: 429

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

aj2109 avatar Feb 27 '24 16:02 aj2109

O hell yeah

lukas-the-wizard avatar Jan 17 '24 23:01 lukas-the-wizard

Ollama is very close to supporting AMD GPUs through ROCm using mainline llama.cpp.

easp avatar Jan 18 '24 02:01 easp

Yeah but ROCm doesnt run on my GPU from AMD

lukas-the-wizard avatar Jan 18 '24 07:01 lukas-the-wizard

Having Vulkan support would be huge. ROCm is not that widely supported thorough AMD GPUs, plus it might allow supporting GPU accel on devices like Intel Arc or older AMD GPUs, like Navi 14

KhazAkar avatar Jan 18 '24 13:01 KhazAkar

https://github.com/ggerganov/llama.cpp/pull/2059 got merged

maxwell-kalin avatar Jan 30 '24 08:01 maxwell-kalin

Also this https://github.com/ggerganov/llama.cpp/pull/4456

maxwell-kalin avatar Jan 30 '24 22:01 maxwell-kalin

ggerganov/llama.cpp#2059 got merged

That backend seems to be more performant and works on more hardware including Intel GPUs.

Titaniumtown avatar Feb 05 '24 15:02 Titaniumtown

https://github.com/ollama/ollama/pull/2578

ddpasa avatar Feb 18 '24 16:02 ddpasa

Out of curiosity: does Vulkan runner support NPUs included in very recent generations of CPUs (e.g. Intel Ultra)? I remember Vulkan is a graphics framework, right? So probably it will not? Then if not, what would be the right (universal/uniformed) framework/tool for that?

renyuneyun avatar Apr 12 '24 16:04 renyuneyun

Vulkan support would be wonderful. I have an AMD RX 6800 XT, and using KoboldCPP with Vulkan support made using LLMs go from slow-but-kinda-usable to near-instantaneous speeds. My desktop is running Gentoo, which is currently stuck on ROCm 5, and Ollama seems to use ROCm 6.

ProjectMoon avatar Apr 26 '24 07:04 ProjectMoon

Vulkan support would be wonderful. I have an AMD RX 6800 XT, and using KoboldCPP with Vulkan support made using LLMs go from slow-but-kinda-usable to near-instantaneous speeds. My desktop is running Gentoo, which is currently stuck on ROCm 5, and Ollama seems to use ROCm 6.

@ProjectMoon I have experimental vulkan support here: https://github.com/ollama/ollama/pull/2578

I still haven't figured out how to automatically get the memory size from vulkan (especially for iGPUs). Otherwise it works really well. I get massive speedups on my intel iGPU. The default value of VRAM is hardcoded, you should change it for your device (making that automatic is the most important bit).

ddpasa avatar Apr 26 '24 16:04 ddpasa

@ddpasa couldn't that be set so that it has no limit by default and reads such limit from an environment variable, if later a way to find the memory automatically is found it will be nice, but that should not be a blocker IMHO.

leiserfg avatar Apr 26 '24 21:04 leiserfg

@ProjectMoon I have experimental vulkan support here: #2578

I tried it out! Unfortunately, ollama crashes when it tries to run a model, with some kind of illegal instruction error.

I still haven't figured out how to automatically get the memory size from vulkan (especially for iGPUs). Otherwise it works really well. I get massive speedups on my intel iGPU. The default value of VRAM is hardcoded, you should change it for your device (making that automatic is the most important bit).

Based on what I've seen, there doesn't seem to be a real way to get VRAM from video cards via API, in any standardized manner. Maybe best way for integrated GPUs is to just make a very small default VRAM size that can be overridden by the user as an env var/command line option?

ProjectMoon avatar Apr 27 '24 18:04 ProjectMoon

@ProjectMoon I have experimental vulkan support here: #2578

I tried it out! Unfortunately, ollama crashes when it tries to run a model, with some kind of illegal instruction error.

Can you share the error? It's likely related to llama.cpp and not to ollama, but maybe we can forward it there.

ddpasa avatar Apr 29 '24 06:04 ddpasa