-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
python312Packages.llama-cpp-python: init at 0.3.1 #349657
Conversation
Thanks for the work ! Can you explain the motivations behind switching to the bundled version of llama-cpp ? The package looks much simpler than the previous version that used patches on llama-cpp, but lacks support for other back-ends (OpenCL, ROCm). |
Trying to build with Cuda results in the version error:
The usual workaround
works, so it should be possible to add the override to the package. |
I am not the author but the code refers to the llama.cpp's subdirectories which are not included in nixpkg.llama-cpp. For instance https://github.com/abetlen/llama-cpp-python/blob/7403e002b8e033c0a34e93fba2b311e2118487fe/CMakeLists.txt#L110. |
llama-cpp and llama-cpp-python often get out of sync, so using llama-cpp from nixpkgs requires either breaking lama-cpp-python or not updating llama-cpp @alexvorobiev CUDA support builds without any overrides, do you change default cuda in your overlays ? |
I have to use CUDA 12.2 for now, could that be the issue? |
3ade7c5
to
4173566
Compare
yes, it seems to only build with 12.4 ( which is default in nixpkgs ) |
@alexvorobiev I've fixed cuda build, tested with 12_3, 12_2, 12_1, 12_0, 11_8 ( stopped here ) |
Thank you! |
c9ca8b6
to
f4e43ac
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-development-environment-for-python-ai-llama-3-1/56143/3 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-development-environment-for-python-ai-llama-3-1/56143/4 |
Unsure if there are any outstanding issues, but best to merge instead of leaving the PR for a long time, so have merged and will try to use it and identify any outstanding issues. |
unlike previous attempt #268712
this uses bundled version of llama-cpp, also tested CUDA support
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.