You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TEMP FIX] Ollama / llama.cpp: cannot find tokenizer merges in model file #1065
I just communicated with the Hugging Face team - they will upstream updates to llama.cpp later in the week. It seems like tokenizers>=0.20.0 is the culprit.
I re-uploaded all Llama-3.2 models and as a temporary fix, Unsloth will use transformers==4.44.2.
Please try again and see if it works! This unfortunately means you need to re-finetune the model if you did not save the 16bit merged HF weights or the LoRA weights - extreme apologiesnif you saved them, simply update Unsloth then reload them and convert to GGUF.
@lastrei Apologies - do you know which model exactly?
thanks danielhanchen,
the model is unsloth/meta-llama-3.1-8b-instruct-bnb-4bit
btw:
I used llama-cpp to manually convert apater to gguf, which can be used in ollama with basemodel. This transformer upgrade brought a lot of troubles, and there are also corresponding llama-cpp problems:#748
Error: llama runner process has terminated: error loading model: error loading model vocabulary: cannot find tokenizer merges in model file
llama_model_load_from_file_impl: failed to load model
I tried the rollback from #1065 (comment) , saving, pushing and running via Ollama again, no improvements.
ollama[193]: llama_model_load: error loading model: error loading model vocabulary: cannot find tokenizer merges in model file
ollama[193]: llama_model_load_from_file_impl: failed to load model
I tried the downgrade transformers fix but that caused the finetuning to fail entirely due to incompatiblity.
This issue should be fixed now - sorry on the delay - please update with uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir - if the issue is still there, please open another issue - appreciate it again!
Activity
laoc81 commentedon Sep 27, 2024
Thank you for miraculous "unsloth"!! IT was working very well las week.
Now, i am having the same problem that @thackmann:
My notebook -> transformers 4.44.2 (the same last week).
Error: llama runner process has terminated: error loading model: error loading model vocabulary: cannot find tokenizer merges in model file
xmaayy commentedon Sep 27, 2024
Same issue!
ThaisBarrosAlvim commentedon Sep 28, 2024
Same issue!
kingabzpro commentedon Sep 28, 2024
same issue.
Mukunda-Gogoi commentedon Sep 28, 2024
facing similar issues is there a fix?? I m blocked!
Saber120 commentedon Sep 28, 2024
same issue with llama3.2 3B , any solution please
shimmyshimmer commentedon Sep 28, 2024
Hey guys working on a fix. The new transformers version kind of broke everything
adampetr commentedon Sep 28, 2024
Same issue .. anyone have an idea where the problem is located.
kingabzpro commentedon Sep 28, 2024
Yes. I tried to work around. Using llama.cpp but it didnt worked. The issues arise when we fine-tune and save the model.
williamzebrowskI commentedon Sep 28, 2024
Same issue. Huge bummer - literally spent hours fine tuning and uploading to HF to get these error the past couple of days thinking it was me.
Franky-W commentedon Sep 29, 2024
same issue here.
thank you @shimmyshimmer for working on the fix!
mahiatlinux commentedon Sep 29, 2024
Hey guys. Yes, this is a current issue. But the boys are working to fix it. If you saved LORA, you might not have to rerun training.
williamzebrowskI commentedon Sep 29, 2024
There is a workaround that was posted here and it worked for me.
#1062 (comment)
kingabzpro commentedon Sep 29, 2024
This will not work for Llama 3.2 models.
gianmarcoalessio commentedon Sep 29, 2024
same issue!!
20 remaining items
kingabzpro commentedon Sep 30, 2024
The fix is not working on Kaggle.
FotieMConstant commentedon Sep 30, 2024
danielhanchen commentedon Oct 1, 2024
@kingabzpro I just updated pypi so
pip install unslothshould have the temporary fixes - you might have to restart Kagglekingabzpro commentedon Oct 1, 2024
It is working on Kaggle now. Thank you.
lastrei commentedon Dec 12, 2024
i'm sorry , but in still error in Version: 2024.12.4
i install unsloth with pip install "unsloth[cu121-torch240] @ git+https://github.com/unslothai/unsloth.git"
the transformer version is
numpy version is
i have save the adapter model,and convert to gguf ,when i run it in ollama ,it's still the same error:
Error: llama runner process has terminated: error loading model: error loading model vocabulary: cannot find tokenizer merges in model file
danielhanchen commentedon Dec 12, 2024
@lastrei Apologies - do you know which model exactly?
lastrei commentedon Dec 13, 2024
thanks danielhanchen,
the model is unsloth/meta-llama-3.1-8b-instruct-bnb-4bit
btw:
I used llama-cpp to manually convert apater to gguf, which can be used in ollama with basemodel. This transformer upgrade brought a lot of troubles, and there are also corresponding llama-cpp problems:#748
ethanelasky commentedon Dec 13, 2024
I am getting a similar issue with the model
meta-llama/Llama-3.1-8B-Instructand the samenumpyandtransformersversions as @lastrei.Torch: 2.5.1, Cuda toolkit 12.1
JohnWangCH commentedon Dec 13, 2024
I encountered the same problem a few hours ago.
The problem has been solved with the following steps on my end:
Then, ollama can run the model w/o problems. FYR.
My env:
model_name = "unsloth/Llama-3.2-3B-Instruct",
Name: numpy
Version: 1.26.4
Name: transformers
Version: 4.46.3
Name: unsloth
Version: 2024.12.4
lastrei commentedon Dec 14, 2024
thanks JohnWangCH,i will try it
it's works!
phiwi commentedon Mar 7, 2025
I am also experiencing the same error.
I saved and pushed a model finetuned with unsloth (derived from
unsloth/Meta-Llama-3.1-8B):When running Ollama (in Docker)
I get
I tried the rollback from #1065 (comment) , saving, pushing and running via Ollama again, no improvements.
manu-one commentedon Jul 30, 2025
Ran into the same problem today.
transformers 4.54.1
unsloth 2025.7.11
unsloth-zoo 2025.7.11
I tried the downgrade transformers fix but that caused the finetuning to fail entirely due to incompatiblity.
danielhanchen commentedon Jun 17, 2026
This issue should be fixed now - sorry on the delay - please update with
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir- if the issue is still there, please open another issue - appreciate it again!