Skip to content

Quantization error - model.save_pretrained_gguf(new_model, tokenizer, quantization_method = "q4_k_m") #579

Description

@dynamite9999

Hello All,
I have been saving llama3 in gguf for weeks and was working fine.
Only today, I started getting the error, I tried everything including the suggestion git clone and make clean / make all with the flags.

Any suggestions / hints to get past this issue, very much appreciated.
Traceback (most recent call last):
File "/home/d/hp/dev/syslog/syslog_scraper/t59_nie_func_data/t13.py", line 1276, in
main()
File "/home/d/hp/dev/syslog/syslog_scraper/t59_nie_func_data/t13.py", line 1231, in main
model.save_pretrained_gguf(TRAINED_GGUF_MODEL, tokenizer, quantization_method = "q4_k_m")
File "/home/d/.local/lib/python3.11/site-packages/unsloth/save.py", line 1340, in unsloth_save_pretrained_gguf
file_location = save_to_gguf(model_type, new_save_directory, quantization_method, first_conversion, makefile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/d/.local/lib/python3.11/site-packages/unsloth/save.py", line 964, in save_to_gguf
raise RuntimeError(
RuntimeError: Unsloth: Quantization failed for ./TRAINED_GGUF_MODEL-unsloth.F16.gguf
You might have to compile llama.cpp yourself, then run this again.
You do not need to close this Python program. Run the following commands in a new terminal:
You must run this in the same folder as you're saving your model.
git clone --recursive https://github.com/ggerganov/llama.cpp
cd llama.cpp && make clean && LLAMA_CUDA=1 make all -j
Once that's done, redo the quantization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions