Repository navigation
Description
Error on collab saving GGUF Mistral Small 22b
Unsloth: Kaggle/Colab has limited disk space. We need to delete the downloaded
model which will save 4-16GB of disk space, allowing you to save on Kaggle/Colab.
Unsloth: Will remove a cached repo with size 44.5G
Unsloth: Merging 4bit and LoRA weights to 16bit...
Unsloth: Will use up to 58.42 out of 83.48 RAM for saving.
Unsloth: Saving model... This might take 5 minutes ...
48%|████▊ | 27/56 [00:01<00:00, 34.08it/s]
We will save to Disk and not RAM now.
100%|██████████| 56/56 [00:57<00:00, 1.02s/it]
Unsloth: Saving tokenizer... Done.
Done.
Unsloth: Converting mistral model. Can use fast conversion = True.
==((====))== Unsloth: Conversion from QLoRA to GGUF information
\ /| [0] Installing llama.cpp might take 3 minutes.
O^O/ _/ \ [1] Converting HF to GGUF 16bits might take 3 minutes.
\ / [2] Converting GGUF 16bits to ['q4_k_m', 'q4_0', 'q5_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: CMAKE detected. Finalizing some steps for installation.
Unsloth: [1] Converting model at AlSamCur123/MistralSmall22bAlpaca into bf16 GGUF format.
The output location will be /content/AlSamCur123/MistralSmall22bAlpaca/unsloth.BF16.gguf
This might take 3 minutes...
TypeError Traceback (most recent call last)
/tmp/ipython-input-3191303488.py in <cell line: 0>()
15 # Save to multiple GGUF options - much faster if you want multiple!
16 if True:
---> 17 model.push_to_hub_gguf(
18 "AlSamCur123/MistralSmall22bAlpaca", # Change hf to your username!
19 tokenizer,
4 frames
/usr/local/lib/python3.12/dist-packages/google/protobuf/descriptor.py in new(cls, name, index, number, type, options, serialized_options, create_key)
918 type=None, # pylint: disable=redefined-builtin
919 options=None, serialized_options=None, create_key=None):
--> 920 _message.Message._CheckCalledFromGeneratedFile()
921 # There is no way we can build a complete EnumValueDescriptor with the
922 # given parameters (the name of the Enum is not known, for example).
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
Activity
[-][Bug] Please fill in your issue title here.[/-][+][Bug] Error on collab saving GGUF Mistral Small 22b[/+]CAISAMPS commentedon Aug 21, 2025
So it is generalized minor bug or issue. Okay. I will wait a few days and see if it changes.
CAISAMPS commentedon Aug 21, 2025
Locally with the 2025.6.8 IIRC it seems to be working well ... Same model seems to save easy enough.
But on Collab with the newest code from Unsloth notebooks -- Caput.
Thanks again Unsloth -- small errors aside -- this is really cool project. It has really opened up AI to a lot of folks.
CAISAMPS commentedon Aug 24, 2025
The Mistral 22 Collab Notebook ...
%%capture
import os, re
if "COLAB_" not in "".join(os.environ.keys()):
!pip install unsloth
else:
# Do this only in Colab notebooks! Otherwise use pip install unsloth
import torch; v = re.match(r"[0-9.]{3,}", str(torch.version)).group(0)
xformers = "xformers==" + "0.0.32.post2" if v == "2.8.0" else "0.0.29.post3"
!pip install --no-deps bitsandbytes accelerate {xformers} peft trl triton cut_cross_entropy unsloth_zoo
!pip install sentencepiece protobuf "datasets>=3.4.1,<4.0.0" "huggingface_hub>=0.34.0" hf_transfer
!pip install --no-deps unsloth
Yeah just tired again:
Unsloth: Kaggle/Colab has limited disk space. We need to delete the downloaded
model which will save 4-16GB of disk space, allowing you to save on Kaggle/Colab.
Unsloth: Will remove a cached repo with size 44.5G
Unsloth: Merging 4bit and LoRA weights to 16bit...
Unsloth: Will use up to 59.35 out of 83.48 RAM for saving.
Unsloth: Saving model... This might take 5 minutes ...
48%|████▊ | 27/56 [00:00<00:00, 37.38it/s]
We will save to Disk and not RAM now.
100%|██████████| 56/56 [00:54<00:00, 1.03it/s]
Unsloth: Saving tokenizer... Done.
Done.
Unsloth: Converting mistral model. Can use fast conversion = True.
==((====))== Unsloth: Conversion from QLoRA to GGUF information
\ /| [0] Installing llama.cpp might take 3 minutes.
O^O/ _/ \ [1] Converting HF to GGUF 16bits might take 3 minutes.
\ / [2] Converting GGUF 16bits to ['q4_k_m', 'q4_0', 'q5_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: CMAKE detected. Finalizing some steps for installation.
Unsloth: [1] Converting model at AlSamCur123/MistralSmall22bAlpaca into bf16 GGUF format.
The output location will be /content/AlSamCur123/MistralSmall22bAlpaca/unsloth.BF16.gguf
This might take 3 minutes...
TypeError Traceback (most recent call last)
/tmp/ipython-input-3191303488.py in <cell line: 0>()
15 # Save to multiple GGUF options - much faster if you want multiple!
16 if True:
---> 17 model.push_to_hub_gguf(
18 "AlSamCur123/MistralSmall22bAlpaca", # Change hf to your username!
19 tokenizer,
4 frames
/usr/local/lib/python3.12/dist-packages/google/protobuf/descriptor.py in new(cls, name, index, number, type, options, serialized_options, create_key)
918 type=None, # pylint: disable=redefined-builtin
919 options=None, serialized_options=None, create_key=None):
--> 920 _message.Message._CheckCalledFromGeneratedFile()
921 # There is no way we can build a complete EnumValueDescriptor with the
922 # given parameters (the name of the Enum is not known, for example).
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
rolandtannous commentedon Oct 15, 2025
I think that protobuf error had to do with a dependency version back then.
@CAISAMPS @crimeragames
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)
8 - If you are on a local machine and can run containers, I highly recommend that you use the containerized environment. No more dependency conflicts. It's safe (non root user) and comes with a prebuilt pretested environment and the most up to date notebooks for you to run. You can find the Docker container image here: https://hub.docker.com/r/unsloth/unsloth
The how to guide for the docker container can be found here: https://docs.unsloth.ai/get-started/install-and-update/docker
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
CAISAMPS commentedon Oct 24, 2025
Thank you.