alpaca-lora icon indicating copy to clipboard operation
alpaca-lora copied to clipboard

Are the saved models (either adapter_model.bin or pytorch_model.bin) only 25-26MB in size?

Open LAB-703 opened this issue 1 year ago • 5 comments

Is it correct?

LAB-703 avatar Nov 07 '23 07:11 LAB-703

plus, anybody know how to convert the saved models to safetensor to upload huggingface?

LAB-703 avatar Nov 07 '23 08:11 LAB-703

I have same questions and also I wnat to know how to convert safetensor to huggingface foramt( e.g. from_pretrained)

minju0307 avatar Nov 16 '23 07:11 minju0307

I solved installed transformers==4.33.3. the newest transformer version save model default with safetensors, but I think it is not stable for LoRA. with transformers=4.33.3, it saved *.bin model

minju0307 avatar Nov 16 '23 08:11 minju0307

I solved installed transformers==4.33.3. the newest transformer version save model default with safetensors, but I think it is not stable for LoRA. with transformers=4.33.3, it saved *.bin model

Can you explain more about your setup? I install transformers==4.33.3, and fine-tune CodeLlama-7b with custom dataset, it still outputs safetensors format. By the way, do you know how to inference with the fine-tuned model. I change the --lora_weights direct to local ./lora-alpaca, it occurs error: safetensors_rust.SafetensorError: Error while deserializing header: InvalidHeaderDeserialization

Twelve-or-12 avatar Feb 21 '24 22:02 Twelve-or-12

trainer.save_pretrained(output_dir) will be worked

XiaoXiaoYi123 avatar Feb 27 '24 08:02 XiaoXiaoYi123