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] gemma-3 notebook: push_to_hub_gguf creates a empty repository #2370
After fixing a few bugs like tokenize=False in apply_chat_template: #2273 (comment)
and the issue where it’s not clear you have to run save_pretrained_merged first: #2058 (comment)
So finally, after training and creating the files, the push_to_hub_gguf function creates the repo but without the gemma-3-finetune.Q8_0.gguf model.
It gives this silent error:
Unsloth GGUF:hf-to-gguf:Model successfully exported to ./
Unsloth: Converted to gemma-3-finetune.Q8_0.gguf with size = 1.1G
Unsloth: Successfully saved GGUF to:
gemma-3-finetune.Q8_0.gguf
No files have been modified since last commit. Skipping to prevent empty commit.
WARNING:huggingface_hub.hf_api:No files have been modified since last commit. Skipping to prevent empty commit.
Environment Setup:
unsloth==2025.3.19
Reproduction Steps:
fix bugs described above
Run Gemma 3 (4B) notebook
Expected Behavior:
Save quantized model to huggingface properly.
Actual Behavior:
repository is created but is empty.
@psychodinae Hi!
As workaround for me worked the following:
Run:
model.save_pretrained_merged("gemma-3-finetune", tokenizer)
model.save_pretrained_gguf(
"gemma-3-finetune",
quantization_type = "Q8_0", # For now only Q8_0, BF16, F16 supported
)
It should create a folder named gemma-3-finetune and a file something.gguf (the .gguf file will be created in /content/ on colab so you have to move it inside the gemma-3-finetune folder).
At this point run
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)
Will be closing this for now as the issue has been resolved. Please make sure to follow the instructions given here
Meanwhile , please feel free to respond if you're still having any issues.
Activity
shimmyshimmer commentedon Apr 17, 2025
Thank you for letting us know - we know others are having the issue! Will investigate. Have you tried saving locally and see if it works?
According to some folks, local works but pushing might not
edoproch commentedon Apr 18, 2025
@psychodinae Hi!
As workaround for me worked the following:
Run:
It should create a folder named gemma-3-finetune and a file something.gguf (the .gguf file will be created in /content/ on colab so you have to move it inside the gemma-3-finetune folder).
At this point run
Sometimes it worked sometimes no, but you can give it a try
github-actions commentedon Jul 1, 2025
Is this issue still important to you? Apologies in advance we might have missed this issue as well. For faster response times, please post on our Reddit server - https://www.reddit.com/r/unsloth or our Discord - https://discord.com/invite/unsloth
pegasiu commentedon Jul 1, 2025
Same issue here
rolandtannous commentedon Oct 23, 2025
@pegasiu @psychodinae @edoproch
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)
Will be closing this for now as the issue has been resolved. Please make sure to follow the instructions given here
Meanwhile , please feel free to respond if you're still having any issues.
Thank you