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
Feature request: export to GGUF LoRA (not merging) #1546
Hi, I'm one of the maintainer working on LoRA support on llama.cpp
FYI, we already had a script convert_lora_to_gguf.py that can convert any PEFT-compatible LoRA adapter into GGUF, without merging into base model.
I would like to discuss if we can take advantage of this feature to convert fine-tuned adapter directly into GGUF. An idea could be:
# add save_method = "lora" to export just the adapter, not mergingmodel.save_pretrained_gguf("dir", tokenizer, save_method="lora", quantization_method="f16")
following up to see if there is any progress on this, this would indeed be really useful to export only LoRA adaptors when exporting models, saving tons of space in the process
exports just the adapter through llama.cpp's convert_lora_to_gguf.py.
Please update Unsloth: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Reopen if it still happens!
Activity
danielhanchen commentedon Jan 16, 2025
Yes that would be very cool indeed! There was a code path to convert to GGUF LoRA, but it's not maintained that well.
I'm currently working on refactoring saving to GGUF in https://github.com/unslothai/unsloth-zoo/blob/nightly/unsloth_zoo/llama_cpp.py
But having direct LoRA exporting would be very cool!
jerpint commentedon Oct 7, 2025
following up to see if there is any progress on this, this would indeed be really useful to export only LoRA adaptors when exporting models, saving tons of space in the process
rolandtannous commentedon Oct 15, 2025
Hello we just fixed
save_to_gguf()but have not integrated exporting to GGUF Lora yet. Might do this next .danielhanchen commentedon Sep 6, 2026
Yes this works now!
exports just the adapter through llama.cpp's convert_lora_to_gguf.py.
Please update Unsloth:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one). Reopen if it still happens!MLX inference test stub: accept any arguments a zoo helper is called …