-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitsandbytes dos not support ROCm #56
Comments
ROCm is not officially supported by bitsandbytes, see #107 #681, so for now, it's set to throw an error when you try to use As for KobaldAI, while the main repo has been fairly inactive, Henk717 has a pretty active fork with a few more (2827) commits that could be viable to switch to. Alternatively KobaldCPP and KobaldCPP-ROCm could be packaged, although two separate repos seems less than ideal. |
@Airradda yes, totally up for using a fork, maybe Nixpkgs is also okay with it, but I'll accept it as soon as you make it. For me, this repo is about making things work, regardless of hacks, and then eventually upstreaming as much as possible to Nixpkgs. |
text-generation webui works with rocm but installation can make you sweat. You indeed need to you use bitsandbytes from this repo but you ' ll have to run textgeneration webui can use many different model loaders ( AutoGPTQ, exllama, llama_cpp ...) and many of those python loaders are rocm specific. I'll paste a some Dockerfiles I created to run textgen and a requirements.txt for rocm below that worked for me. Sorry I have exactly a 4 hour experience with nix so I can´t translate that to a flake for now. I don't know if nixified-ai pulls rocm 5.7 like python310Packages.torchWithRocm does but I would stick to rocm 5.6.1 for now since 5.7 is really new and I am not sure that all the python rocm packages work with 5.7 . Since I have created many other docker containers for amd rocm with apps like : fooocus, h2ogpt, llava, stable-diffusion, Retrieval-based-Voice-Conversion-WebUI I'd be happy to help including them to nixified-ai . Actually docker is what brought me to nix with the hope nix could reduce their size since most of them use around 20GB. Dockerfile rocmyai-base: FROM rocm/dev-ubuntu-22.04:5.6.1-complete as rocmyai-base SHELL ["/bin/bash", "-c"] Dockerfile textgenwebui_rocmyai-5.6.1: FROM rocmyai-base as textgenwebui_rocmyai-5.6.1 SHELL ["/bin/bash", "-c"] requirements_rocm.txt: accelerate==0.23.* |
I'll start working on it after I figure out how the new structure is setup after the refactor (079f83b). My working copy simply overwrote bitsandbytes as I only have an AMD GPU and didn't need the Nvidia stuff, which obviously won't work here. It would probably be a good idea to have some info for contributing along with any relevant info for #2 and #26. |
The reason they use 20GB is because of the poorly defined and seemingly unlimited runtime dependencies. text-generation-webui ambiguously requires the kitchen sink a runtime, and if we want to make the functionality equivalent to what you just posted, we also have to provide the kitchen sink. We also have to reverse engineer what parts the kitchen sink is made of, because not all of the dependencies are cleanly described in their entirety in any readable file or document in the repo, such as the requirements.txt. If we obtained equivalent functionality, it's probably true that we'd approach that size too. I don't think text-generation-webui is worth that amount of effort though, as something written in Rust compatible with WGPU/BURN is hopefully going to be written in the future, which means all of these problems will disappear, as it's created on better foundations. I will accept any PR that fixes text-generation-webui's quirks though. |
For me the instant gain is not having to have 2+ copies of ROCm and some of the other requirements as I have Text-Gen (docker), SD-WebUI(nix-stable-diffusion), and InvokeAI(nixified-ai) installed, having multiple copies of models as not everything is playing nice with symlinks (docker), and basically just not having to deal with docker. Tackling extensions and their requirements (the kitchen sink) is going to be a whole nother mess. |
While trying to run
nix run .#textgen-amd
I got the following error:error:
… while evaluating the attribute 'optionalValue.value'
Also may I ask why not keep both KoboldAI and textgen as a part of the project?
The text was updated successfully, but these errors were encountered: