Repository navigation
Description
I am running this docker container: nvcr.io/nvidia/pytorch:25.10-py3 on DGX Spark
i made a fresh llama.ccp build within the docker container:
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Releaseexport PATH="/home/ollam3/llama.cpp/build/bin:$PATH"
and llama.ccp is accessible:
root@a3e66db5040b:/workspace/Training# llama-cli --version
ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 1 CUDA devices:
Device 0: NVIDIA GB10, compute capability 12.1, VMM: yes
version: 6967 (b7f9010d2)
built with cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 for aarch64-linux-gnu
After finetuning a Vision LLM (medgemma-4b-it-unsloth-bnb-4bit) conversion to gguf fails. why does unsloth not find the binaries and tries to rebuild llama.ccp?
{'train_runtime': 487.5697, 'train_samples_per_second': 0.656, 'train_steps_per_second': 0.021, 'train_loss': 0.7634800791740417, 'epoch': 0.17}
100%|██████████████████████████████████████████████████████████████████████████████████████| 10/10 [08:07<00:00, 48.76s/it]
Unsloth: ##### The current model auto adds a BOS token.
Unsloth: ##### Your chat template has a BOS token. We shall remove it temporarily.
Unsloth: Merging model weights to 16-bit format...
/usr/local/lib/python3.12/dist-packages/unsloth_zoo/saving_utils.py:965: UserWarning: Model ../AIEngine/medgemma-4b-it-unsloth-bnb-4bit not found locally or on HuggingFace
warnings.warn(f"Model {model_name} not found locally or on HuggingFace")
Unsloth: Converting to GGUF format...
==((====))== Unsloth: Conversion from HF to GGUF information
\ /| [0] Installing llama.cpp might take 3 minutes.
O^O/ _/ \ [1] Converting HF to GGUF bf16 might take 3 minutes.
\ / [2] Converting GGUF bf16 to ['q4_k_m'] might take 10 minutes each.
"-____-" In total, you will have to wait at least 16 minutes.Unsloth: Installing llama.cpp. This might take 3 minutes...
Unsloth: llama.cpp folder exists but binaries not found - will rebuild
Unsloth: Updating system package directories
Unsloth: All required system packages already installed!
Unsloth: Install llama.cpp and building - please wait 1 to 3 minutes
Unsloth: Install GGUF and other packages
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/unsloth/save.py", line 1074, in save_to_gguf
quantizer_location, converter_location = check_llama_cpp()
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/unsloth_zoo/llama_cpp.py", line 343, in check_llama_cpp
raise RuntimeError(
RuntimeError: Unsloth: No working quantizer found in llama.cpp
Files in directory: convert_hf_to_gguf.py, common, gguf-py, convert_llama_ggml_to_gguf.py, CONTRIBUTING.md, README.md, convert_lora_to_gguf.py, CMakeLists.txt, CMakePresets.json, SECURITY.md, CODEOWNERS, examples, licenses, flake.nix, ggml, requirements.txt, ci, convert_hf_to_gguf_update.py, Makefile, build-cudaDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/unsloth/save.py", line 1835, in unsloth_save_pretrained_gguf
all_file_locations, want_full_precision, is_vlm_update = save_to_gguf(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/unsloth/save.py", line 1085, in save_to_gguf
quantizer_location, converter_location = install_llama_cpp(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/unsloth_zoo/llama_cpp.py", line 415, in install_llama_cpp
try_execute(f"{pip} install gguf protobuf sentencepiece mistral_common", **kwargs)
File "/usr/local/lib/python3.12/dist-packages/unsloth_zoo/llama_cpp.py", line 275, in try_execute
raise RuntimeError(error_msg)
RuntimeError: [FAIL] Commanduv pip install gguf protobuf sentencepiece mistral_commonfailed with exit code 2
stdout: error: No virtual environment found; runuv venvto create an environment, or pass--systemto install into a non-virtual environmentDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/workspace/Training/finetunevisionGemma3_Herz.py", line 217, in
model.save_pretrained_gguf("unsloth_finetune", tokenizer, quantization_method = "q4_k_m")
File "/usr/local/lib/python3.12/dist-packages/unsloth/save.py", line 1855, in unsloth_save_pretrained_gguf
raise RuntimeError(f"Unsloth: GGUF conversion failed: {e}")
RuntimeError: Unsloth: GGUF conversion failed: [FAIL] Commanduv pip install gguf protobuf sentencepiece mistral_commonfailed with exit code 2
stdout: error: No virtual environment found; runuv venvto create an environment, or pass--systemto install into a non-virtual environment
root@a3e66db5040b:/workspace/Training# pip list
Package Version Build
absl-py 2.3.1
accelerate 1.11.0
aiohappyeyeballs 2.6.1
aiohttp 3.13.2
aiosignal 1.4.0
annotated-types 0.7.0
anyio 4.11.0
apex 0.1
argon2-cffi 25.1.0
argon2-cffi-bindings 25.1.0
arrow 1.3.0
asttokens 3.0.0
astunparse 1.6.3
async-lru 2.0.5
attrs 25.4.0
audioread 3.0.1
babel 2.17.0
beautifulsoup4 4.14.2
bitsandbytes 0.48.2
black 25.9.0
bleach 6.2.0
build 1.3.0
certifi 2025.10.5
cffi 2.0.0
charset-normalizer 3.4.4
click 8.3.0
cmake 3.31.6
comm 0.2.3
contourpy 1.3.3
cut-cross-entropy 25.1.1
cycler 0.12.1
Cython 3.1.4
datasets 4.4.1
debugpy 1.8.17
decorator 5.2.1
defusedxml 0.7.1
diffusers 0.35.2
dill 0.4.0
dllist 2.0.0
dm-tree 0.1.9
docstring_parser 0.17.0
einops 0.8.1
execnet 2.1.1
executing 2.2.1
expecttest 0.3.0
fastjsonschema 2.21.2
filelock 3.20.0
flash_attn 2.7.4.post1+25.10 36764868
fonttools 4.60.1
fqdn 1.5.1
frozenlist 1.8.0
fsspec 2025.9.0
gast 0.6.0
grpcio 1.75.1
h11 0.16.0
hf_transfer 0.1.9
hf-xet 1.2.0
httpcore 1.0.9
httpx 0.28.1
huggingface-hub 0.36.0
hypothesis 6.130.8
idna 3.11
importlib_metadata 8.7.0
iniconfig 2.1.0
ipykernel 7.0.1
ipython 9.6.0
ipython_pygments_lexers 1.1.1
isoduration 20.11.0
isort 7.0.0
jedi 0.19.2
Jinja2 3.1.6
joblib 1.5.2
json5 0.12.1
jsonpointer 3.0.0
jsonschema 4.25.1
jsonschema-specifications 2025.9.1
jupyter_client 8.6.3
jupyter_core 5.9.1
jupyter-events 0.12.0
jupyter-lsp 2.3.0
jupyter_server 2.17.0
jupyter_server_terminals 0.5.3
jupyterlab 4.4.9
jupyterlab_code_formatter 3.0.2
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.3
jupyterlab_tensorboard_pro 4.0.0
jupytext 1.17.3
kiwisolver 1.4.9
lark 1.3.0
lazy_loader 0.4
librosa 0.11.0
lightning-thunder 0.2.5.dev0
lightning-utilities 0.15.2
lintrunner 0.12.7
llvmlite 0.45.1
looseversion 1.3.0
Markdown 3.9
markdown-it-py 4.0.0
MarkupSafe 3.0.3
matplotlib 3.10.7
matplotlib-inline 0.1.7
mdit-py-plugins 0.5.0
mdurl 0.1.2
mistune 3.1.4
ml_dtypes 0.5.3
mock 5.2.0
mpmath 1.3.0
msgpack 1.1.2
msgspec 0.19.0
multidict 6.7.0
multiprocess 0.70.18
mypy_extensions 1.1.0
nbclient 0.10.2
nbconvert 7.16.6
nbformat 5.10.4
nest-asyncio 1.6.0
networkx 3.5
ninja 1.13.0
notebook 7.4.7
notebook_shim 0.2.4
numba 0.62.1
numpy 2.1.0
nvfuser 0.2.32+gited11f2b
nvidia-cudnn-frontend 1.14.1
nvidia-dali-cuda130 1.51.2
nvidia-mathdx 25.1.1
nvidia-ml-py 13.580.82
nvidia-modelopt 0.35.1
nvidia-nvcomp-cu13 5.0.0.6
nvidia-nvimgcodec-cu13 0.6.0.32
nvidia-nvjpeg-cu13 0.0.0a0
nvidia-nvjpeg2k-cu13 0.9.0.43
nvidia-nvtiff-cu13 0.5.1.75
nvidia-resiliency-ext 0.4.1+cuda13
onnx 1.18.0
onnx-ir 0.1.11
onnxscript 0.5.4
opt_einsum 3.4.0
optree 0.17.0
packaging 25.0
pandas 2.3.3
pandocfilters 1.5.1
parso 0.8.5
pathspec 0.12.1
peft 0.17.1
pexpect 4.9.0
pillow 12.0.0
pip 25.2
platformdirs 4.5.0
pluggy 1.6.0
polygraphy 0.49.26
pooch 1.8.2
prometheus_client 0.23.1
prompt_toolkit 3.0.52
propcache 0.4.1
protobuf 6.33.0
psutil 7.1.0
ptyprocess 0.7.0
PuLP 3.3.0
pure_eval 0.2.3
pyarrow 22.0.0
pybind11 3.0.1
pybind11-global 3.0.1
pycocotools 2.0+nv0.8.1
pycparser 2.23
pydantic 2.12.2
pydantic_core 2.41.4
Pygments 2.19.2
pyparsing 3.2.5
pyproject_hooks 1.2.0
pytest 8.1.1
pytest-flakefinder 1.1.0
pytest-rerunfailures 16.1
pytest-shard 0.1.2
pytest-xdist 3.8.0
python-dateutil 2.9.0.post0
python_hostlist 2.3.0
python-json-logger 4.0.0
pytokens 0.2.0
pytorch-triton 3.4.0+gitc817b9b6
pytz 2025.2
PyYAML 6.0.3
pyzmq 27.1.0
referencing 0.37.0
regex 2025.9.18
requests 2.32.5
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rfc3987-syntax 1.1.0
rich 14.2.0
rpds-py 0.27.1
safetensors 0.6.2
scikit-learn 1.7.2
scipy 1.16.2
Send2Trash 1.8.3
sentencepiece 0.2.1
setuptools 79.0.1
shtab 1.7.2
six 1.16.0
sniffio 1.3.1
sortedcontainers 2.4.0
soundfile 0.13.1
soupsieve 2.8
soxr 1.0.0
stack-data 0.6.3
sympy 1.14.0
tabulate 0.9.0
tensorboard 2.20.0
tensorboard-data-server 0.7.2
tensorrt 10.13.3.9
terminado 0.18.1
threadpoolctl 3.6.0
tinycss2 1.4.0
tokenizers 0.22.1
torch 2.9.0a0+145a3a7bda.nv25.10
torch_tensorrt 2.9.0a0
torchao 0.14.1
torchprofile 0.0.4
torchvision 0.24.0a0+094e7af5
tornado 6.5.2
tqdm 4.67.1
traitlets 5.14.3
transformer_engine 2.8.0+40c69e75
transformers 4.57.1
triton 3.5.0
trl 0.23.0
typeguard 4.4.4
types-python-dateutil 2.9.0.20251008
typing_extensions 4.15.0
typing-inspection 0.4.2
tyro 0.9.35
tzdata 2025.2
unsloth 2025.11.1
unsloth_zoo 2025.11.1
uri-template 1.3.0
urllib3 2.5.0
uv 0.9.3
wcwidth 0.2.14
webcolors 24.11.1
webencodings 0.5.1
websocket-client 1.9.0
Werkzeug 3.1.3
wheel 0.45.1
wrapt 1.17.3
xdoctest 1.0.2
xxhash 3.6.0
yarl 1.22.0
zipp 3.23.0
Activity
rolandtannous commentedon Nov 7, 2025
@weoieoeo unsloth pulls, installs and builds llama.cpp within the current project working directory where the script is running, so it expects the binaries to be under llama.cpp/binary_name . Make sure your llama.cpp folder is placed there.
Eventually, we'll add a feature where we check to see if there are llama.cpp binaries in the system PATH before building locally, but for the time being make sure llama.cpp is in your current working directory. Thanks
weoieoeo commentedon Nov 7, 2025
@rolandtannous I have copied llama.ccp to my working directory /home/ollam3.
The build (I made previously) is located in /home/ollam3/llama.cpp/build/bin
However, when I start the finetuning script from my working directory
I get the error:
If I remove llama.ccp from the working directory, I get the same error.
If I only remove the build folder (I made yesterday) from the folder llama.ccp, I get this same error.
What I find odd ist this error within the error message:
Thus, I cannot confirm (in my case) that unsloth finds or rebuilds llama.ccp :-(
rolandtannous commentedon Nov 7, 2025
@weoieoeo since your
finetunevisionGemma3_Herz.pyscript is in Training folder, that's your current working directory when you run the script , as such yourllama.cppfolder should be under/home/ollam3/Training/so/home/ollam3/Training/llama.cpp(and not the parent directory/home/ollam3)can you try again that way
weoieoeo commentedon Nov 7, 2025
everything is now located in the same working directory:
However, I still get the same error:
Maybe one has to conclude that I does currently not work within a docker container?
rolandtannous commentedon Nov 7, 2025
I don't know how your container is constructed. It works perfectly fine with our regular container which is unfortunately not arm64 compatible because i don't have access to a DGX or an arm64 machine to troubleshoot. If you have some time , I'd appreciate if you can hop on our discord server and ping me there . I have the same nickname. Maybe we can work through it and find a solution that works for arm64 machines.
weoieoeo commentedon Nov 7, 2025
I just copied all files from the llama.ccp-build folder to the llama.ccp base folder that is located in the working folder
root@a3e66db5040b:/home/ollam3# cp llama.cpp/build/bin/* ./llama.cpp/
Unsloth now finds the necessary files and creates a gguf! Many thanks!
rolandtannous commentedon Nov 7, 2025
Yes that's how it's supposed to work.
Great to know that it works for you now.
I'll close this thread for the time being.
Thank you for reaching out