-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Route CPU-only Linux x86_64 to ggml-org/llama.cpp prebuilts #5302
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -582,11 +582,30 @@ _LLAMA_CPP_DEGRADED=false | |||||||||||||||||||||||||||||
| _LLAMA_FORCE_COMPILE="${UNSLOTH_LLAMA_FORCE_COMPILE:-0}" | ||||||||||||||||||||||||||||||
| _REQUESTED_LLAMA_TAG="${UNSLOTH_LLAMA_TAG:-${_DEFAULT_LLAMA_TAG}}" | ||||||||||||||||||||||||||||||
| _HOST_SYSTEM="$(uname -s 2>/dev/null || true)" | ||||||||||||||||||||||||||||||
| _HOST_MACHINE="$(uname -m 2>/dev/null || true)" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Pick the release repo install_llama_prebuilt.py plans against. | ||||||||||||||||||||||||||||||
| # unslothai/llama.cpp ships only Linux CUDA bundles, so CPU-only Linux | ||||||||||||||||||||||||||||||
| # x86_64 routes to ggml-org for bin-ubuntu-x64.tar.gz. Anything with a | ||||||||||||||||||||||||||||||
| # GPU tool installed stays on unslothai (CUDA bundle / ROCm source build). | ||||||||||||||||||||||||||||||
| _LINUX_HAS_GPU=false | ||||||||||||||||||||||||||||||
| for _GPU_TOOL in nvidia-smi rocminfo amd-smi hipconfig hipinfo; do | ||||||||||||||||||||||||||||||
| if command -v "$_GPU_TOOL" >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||
| _LINUX_HAS_GPU=true | ||||||||||||||||||||||||||||||
|
Comment on lines
+593
to
+594
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On Linux x86_64 CPU-only environments that still have GPU utilities on PATH, such as CUDA-based Docker images run without Useful? React with 👍 / 👎. |
||||||||||||||||||||||||||||||
| break | ||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| if [ "$_HOST_SYSTEM" = "Darwin" ]; then | ||||||||||||||||||||||||||||||
| _HELPER_RELEASE_REPO="ggml-org/llama.cpp" | ||||||||||||||||||||||||||||||
| elif [ "$_HOST_SYSTEM" = "Linux" ] \ | ||||||||||||||||||||||||||||||
| && [ "$_HOST_MACHINE" = "x86_64" ] \ | ||||||||||||||||||||||||||||||
| && [ "$_LINUX_HAS_GPU" = false ]; then | ||||||||||||||||||||||||||||||
| _HELPER_RELEASE_REPO="ggml-org/llama.cpp" | ||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||
| _HELPER_RELEASE_REPO="unslothai/llama.cpp" | ||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||
|
Comment on lines
599
to
607
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve conciseness and avoid repeating the assignment to
Suggested change
|
||||||||||||||||||||||||||||||
| unset _GPU_TOOL | ||||||||||||||||||||||||||||||
| _LLAMA_PR="${UNSLOTH_LLAMA_PR:-}" | ||||||||||||||||||||||||||||||
| _SKIP_PREBUILT_INSTALL=false | ||||||||||||||||||||||||||||||
| _LLAMA_PR_FORCE="${UNSLOTH_LLAMA_PR_FORCE:-${_DEFAULT_LLAMA_PR_FORCE}}" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux x86_64 hosts where the CUDA/ROCm compiler is installed but these runtime utilities are not on
PATH(for examplenvccunder/usr/local/cuda/binorhipccunder/opt/rocm/bin), this loop leaves_LINUX_HAS_GPU=falseand the new branch installs the upstream CPU tarball successfully. That suppresses the existing source-build path that explicitly checks those compiler locations and enables-DGGML_CUDA=ON/-DGGML_HIP=ONlater in this same script, so those environments silently lose GPU-enabled llama.cpp instead of building it as before.Useful? React with 👍 / 👎.