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] Saving to GGUF doesn't work for gpt-oss #3297
When saving a LoRA model trained for gpt-oss to GGUF with standard command: if True: model.save_pretrained_gguf("folder",tokenizer, quantization_method ="q8_0")
I get the following error:
RuntimeError: Unsloth: config.json does not exist inside {folder}
I am using BF16 version, but other quants have the same problem. I am using a proprietary dataset, which works fine with any other model. Finetuning part still works but problem occurs only in the gguf conversion part.
If you're working in a local environment, please update your Unsloth installation immediately. We pushed critical fixes for the latest Transformers compatibility last night, but these updates are not yet available on PyPI:
It uses up to 75% less disk space, reduces VRAM consumption by 50%, accelerates merging by 5-10x, and enables much faster conversion to GGUF format. We'll be making a pypi release and updating the docs soon.
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
rolandtannous commentedon Sep 10, 2025
Thank you for reporting this issue. We are currently working on resolving several problems with the
save_pretrained_gguffunctionality.Temporary Workarounds
While we work on a permanent fix, here are two alternative approaches you can use:
Option 1: Use llama.cpp integration
We have prepared a Colab notebook that demonstrates how to use llama.cpp for GGUF conversion:
https://colab.research.google.com/drive/1EevDuEa_CYZt59eMGl7acB6DhlApj61O?usp=sharing
Option 2: Follow our documentation guide
You can also follow the llama.cpp instructions in the Long Context GPT OSS Training documentation, which will generate a proper GGUF file.
Important Installation Update
If you're working in a local environment, please update your Unsloth installation immediately. We pushed critical fixes for the latest Transformers compatibility last night, but these updates are not yet available on PyPI:
We expect to resolve the GGUF saving issues soon and appreciate your patience.
Note: This issue is related to #3133 and #3090.
homanp commentedon Sep 16, 2025
@rolandtannous
save_pretrained_mergedis throwing errors as well,rolandtannous commentedon Sep 16, 2025
@homanp hello
we're introducing some logic changes, so it's temporarily down. It will be back up and running later today. Will ping you
homanp commentedon Sep 16, 2025
Sounds good! Will the gguf saving method also work or do you still recommend using llama cpp for generating gguf?
KineticCookie commentedon Sep 16, 2025
Hi @rolandtannous
Which previous version of unsloth should I use for working
save_pretrained_mergedwhile fix is in the progress?rolandtannous commentedon Sep 16, 2025
@KineticCookie @homanp we just pushed a fixx it should be in pypi
pip installif you're upgrading your env, make sure to use
pip install --force-reinstall --no-depshomanp commentedon Sep 16, 2025
Thank you very much, seems to work fine now.
rolandtannous commentedon Sep 18, 2025
Hello,
if you update your existing installation from main repo using:
you should now be able to save and merge in native MXFP4 format, via:
It uses up to 75% less disk space, reduces VRAM consumption by 50%, accelerates merging by 5-10x, and enables much faster conversion to GGUF format. We'll be making a pypi release and updating the docs soon.
Enjoy
rolandtannous commentedon Oct 14, 2025
@KineticCookie @homanp @tunaozates
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)
homanp commentedon Oct 14, 2025
@rolandtannous this is great, thanks!
rolandtannous commentedon Oct 23, 2025
Will be closing this for now as the issue has been resolved. Please make sure to follow the instructions given in my last response.
Meanwhile , please feel free to respond if you're still having any issues.
Thank you