22-hours / cabrita

Finetuning InstructLLaMA with portuguese data
Apache License 2.0
558 stars 68 forks source link

Can't find config.json at '{pretrained_model_name_or_path} #4

Closed bui-thanh-lam closed 1 year ago

bui-thanh-lam commented 1 year ago

Thanks for your interesting work!

I followed your guideline to finetune the model and try it. But the saved models were only these stuff (image below):

image

So, when I loaded the PEFT model to use, it could not find the config.json of the model. How can I get over it?

Note that this is the checkpoint saved by Huggingface Trainer model during training. I canceled the training job so .save_pretrained() method in the end might not execute.

bui-thanh-lam commented 1 year ago

I found the solution to this: save the config.json seperately, and use the saved weight (i.e. pytorch_model.bin) to load for inference.