Open codeit1792 opened 1 month ago
Just to simplify, we are able compress and use the svdllm models. However, we are unable to convert them to Hugging Face formats like safetensors or GGUF. All our conversion attempts have resulted in the models getting distorted or modified. Can you please help us figure this out?
Issue: Converting Compressed LLaMA2 Model to Hugging Face-Compatible Format
Description
We have successfully compressed a LLaMA2 model with 4.4 billion parameters. However, I am encountering issues when trying to convert the compressed model to a Hugging Face-compatible format. Specifically, when I use the
model.save_pretrained(output_dir)
andtokenizer.save_pretrained(output_dir)
methods, the model parameters revert to the original 6.7 billion, and the output becomes worse and incoherent.Steps to Reproduce
Compress a LLaMA2 model to 4.4 billion parameters.
Use the following code to save the model:
Attempt to use the model from the output directory.
Observed Behavior
Expected Behavior
Additional Context
I have also attempted to convert the model to GGUF format, but encountered similar issues. Any guidance on correctly converting and saving the compressed model for Hugging Face would be greatly appreciated.
Thank you for your assistance!