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
[Bug] save_pretrained_gguf Broken - (Tokenizer?), doesn't support gemma-3 anymore #3348
Did you finetune it? I tried immediately convert to GGUF after adding LoRA and it works fine. How is the inference result after finetuning (using HF)? Is it working normally there?
Did you finetune it? I tried immediately convert to GGUF after adding LoRA and it works fine. How is the inference result after finetuning (using HF)? Is it working normally there?
The inference inside the notebook works normally, Did not try in other ways. I uploaded a new notebook and a dataset, in case anyone wants to test.
Did you finetune it? I tried immediately convert to GGUF after adding LoRA and it works fine. How is the inference result after finetuning (using HF)? Is it working normally there?
Tried with unsloth's notebook, just to make sure. Same issue. I'm not even sure it's the GGUF conversion that breaks it, a fix suggested in discord for the GGUF conversion doesn't help.
What can be said for sure, is that unsloth can't fine tune Gemma 3-1b and save it as GGUF
We still haven't pushed a fix to saving in gguf. It's under review. You'll get pinged here on the thread once its out.
Also note that in the notebook you shared you might want to explicitely remove the bos token just like we do on the official notebook , or else you might end up with garbled output.
@pranaysawant17 not before last week.
meanwhile, merge and push your model to HF, then run this space https://huggingface.co/spaces/ggml-org/gguf-my-repo against your repo. it will convert your repo to GGUF
or do it manually for the time being using llama.cpp directly. should also work
I tried this my HF model works but as soon as I convert it gguf (I used the above space only) on inference it gives no output. This is from verbose
llama_model_loader: - type f32: 157 tensors
llama_model_loader: - type q8_0: 183 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q8_0
print_info: file size = 1013.54 MiB (8.50 BPW)
init_tokenizer: initializing tokenizer for type 1
load: control token: 1 '' is not marked as EOG
load: control token: 0 '' is not marked as EOG
load: control token: 46 '' is not marked as EOG
load: control token: 3 '' is not marked as EOG
load: control token: 54 '' is not marked as EOG
load: control token: 23 '' is not marked as EOG
load: control token: 261532 '' is not marked as EOG
load: control token: 2 '' is not marked as EOG
load: control token: 30 '' is not marked as EOG
load: control token: 260607 '' is not marked as EOG
load: control token: 74 '' is not marked as EOG
load: control token: 259984 '' is not marked as EOG
load: control token: 259158 '' is not marked as EOG
load: control token: 57 '' is not marked as EOG
load: control token: 4 '' is not marked as EOG
load: control token: 43 '' is not marked as EOG
load: control token: 34 '' is not marked as EOG
load: control token: 6 '' is not marked as EOG
load: control token: 258560 '' is not marked as EOG
load: control token: 42 '' is not marked as EOG
load: control token: 35 '' is not marked as EOG
load: control token: 7 '' is not marked as EOG
load: control token: 256766 '' is not marked as EOG
load: control token: 41 '' is not marked as EOG
load: control token: 258676 '' is not marked as EOG
load: control token: 8 '' is not marked as EOG
load: control token: 40 '' is not marked as EOG
load: control token: 260391 '' is not marked as EOG
load: control token: 9 '' is not marked as EOG
load: control token: 39 '' is not marked as EOG
load: control token: 10 '' is not marked as EOG
load: control token: 38 '' is not marked as EOG
load: control token: 11 '' is not marked as EOG
load: control token: 37 '' is not marked as EOG
load: control token: 12 '' is not marked as EOG
load: control token: 36 '' is not marked as EOG
For vision/multimodal models, use tokenizer=processor
3- You can pass it one or several quant methods (as a list):
quantization_method = "q8_0"
or
quantization_method = ["q8_0", "q4_k_m"]
We support all the quants mentioned in this page except the iq variants.
4- If the model is supported by Ollama, it will now also automatically create a Modelfile for you that you can use to create your model in ollama using:
ollama create model_name -f ./Modelfile
5- Use push_to_hub_gguf if you want to convert to gguf and push to Huggingface Hub instead.
6- Should work for all models supported by unsloth and ollama.
7- It now fully supports linux debian and RPM variants. We are still testing windows (if someone has a windows machine and is on our discord channel ping me to help debug)
Activity
[-][Bug] save_pretrained_gguf Broken Tokenizer, doesn't support gemma-3 anymore[/-][+][Bug] save_pretrained_gguf Broken - (Tokenizer?), doesn't support gemma-3 anymore[/+]Erland366 commentedon Sep 22, 2025
Did you finetune it? I tried immediately convert to GGUF after adding LoRA and it works fine. How is the inference result after finetuning (using HF)? Is it working normally there?
rolandtannous commentedon Sep 22, 2025
Hello a fix for llama.cpp compatibility and GGUF conversion+ quantization is getting pushed in the next two days :)
I'll ping you once it's out
orenong commentedon Sep 24, 2025
The inference inside the notebook works normally, Did not try in other ways. I uploaded a new notebook and a dataset, in case anyone wants to test.
dataset.csv
gemma_en_notebook (1).ipynb
orenong commentedon Sep 24, 2025
Thank you. I hope it's gonna fix it 💯
orenong commentedon Sep 25, 2025
Tried with unsloth's notebook, just to make sure. Same issue. I'm not even sure it's the GGUF conversion that breaks it, a fix suggested in discord for the GGUF conversion doesn't help.
What can be said for sure, is that unsloth can't fine tune Gemma 3-1b and save it as GGUF
https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma3_(4B).ipynb
orenong commentedon Sep 25, 2025
Tried running using llama-cpp. Same issue, this rules out an LM-Studio compatibility issue
rolandtannous commentedon Sep 25, 2025
We still haven't pushed a fix to saving in gguf. It's under review. You'll get pinged here on the thread once its out.
Also note that in the notebook you shared you might want to explicitely remove the bos token just like we do on the official notebook , or else you might end up with garbled output.
pranaysawant17 commentedon Sep 26, 2025
when will you do I really need to convert my model to gguf
rolandtannous commentedon Sep 26, 2025
@pranaysawant17 not before last week.
meanwhile, merge and push your model to HF, then run this space
https://huggingface.co/spaces/ggml-org/gguf-my-repoagainst your repo. it will convert your repo to GGUFor do it manually for the time being using
llama.cppdirectly. should also workpranaysawant17 commentedon Sep 27, 2025
I tried this my HF model works but as soon as I convert it gguf (I used the above space only) on inference it gives no output. This is from verbose
llama_model_loader: - type f32: 157 tensors
llama_model_loader: - type q8_0: 183 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q8_0
print_info: file size = 1013.54 MiB (8.50 BPW)
init_tokenizer: initializing tokenizer for type 1
load: control token: 1 '' is not marked as EOG
load: control token: 0 '' is not marked as EOG
load: control token: 46 '' is not marked as EOG
load: control token: 3 '' is not marked as EOG
load: control token: 54 '' is not marked as EOG
load: control token: 23 '' is not marked as EOG
load: control token: 261532 '' is not marked as EOG
load: control token: 2 '' is not marked as EOG
load: control token: 30 '' is not marked as EOG
load: control token: 260607 '' is not marked as EOG
load: control token: 74 '' is not marked as EOG
load: control token: 259984 '' is not marked as EOG
load: control token: 259158 '' is not marked as EOG
load: control token: 57 '' is not marked as EOG
load: control token: 4 '' is not marked as EOG
load: control token: 43 '' is not marked as EOG
load: control token: 34 '' is not marked as EOG
load: control token: 6 '' is not marked as EOG
load: control token: 258560 '' is not marked as EOG
load: control token: 42 '' is not marked as EOG
load: control token: 35 '' is not marked as EOG
load: control token: 7 '' is not marked as EOG
load: control token: 256766 '' is not marked as EOG
load: control token: 41 '' is not marked as EOG
load: control token: 258676 '' is not marked as EOG
load: control token: 8 '' is not marked as EOG
load: control token: 40 '' is not marked as EOG
load: control token: 260391 '' is not marked as EOG
load: control token: 9 '' is not marked as EOG
load: control token: 39 '' is not marked as EOG
load: control token: 10 '' is not marked as EOG
load: control token: 38 '' is not marked as EOG
load: control token: 11 '' is not marked as EOG
load: control token: 37 '' is not marked as EOG
load: control token: 12 '' is not marked as EOG
load: control token: 36 '' is not marked as EOG
orenong commentedon Oct 3, 2025
Ran the same notebook again, and it worked.
Closing for now
rolandtannous commentedon Oct 14, 2025
@orenong @pranaysawant17
We just pushed a major fix for llamacpp integration.
1- Please make sure to update your local install of unsloth
If you're using a notebook on kaggle or colab, it should pull the latest version automatically.
2- You can now use
save_pretrained_ggufto quantize and save to GGUF format:For vision/multimodal models, use
tokenizer=processor3- You can pass it one or several quant methods (as a list):
or
We support all the quants mentioned in this page except the iq variants.
4- If the model is supported by Ollama, it will now also automatically create a
Modelfilefor you that you can use to create your model in ollama using:5- Use
push_to_hub_ggufif you want to convert to gguf and push to Huggingface Hub instead.6- Should work for all models supported by unsloth and ollama.
7- It now fully supports linux debian and RPM variants. We are still testing windows (if someone has a windows machine and is on our discord channel ping me to help debug)
Have fun