Convert unsharded model to huggingface format#435
Conversation
|
Does the current code take into consideration adapter_v2 parameters like "lm_head.adapter_bias"? |
No, this only works to convert the base model into a huggingface format. For a LoRA, you can just use the Lit-LLaMA script to convert it into a base model. Whereas for a different adapter, my understanding is that it should be converted to a separate huggingface module, like here. |
is there a way to combine adapter weights with the base model then convert the whole model to |
This is possible when using the LoRA adapter, with the As it stands, my script is only equipped to convert a model fine-tuned with the full weights or using a LoRA, since these will ultimately result in a model with the same architecture as the original LLaMA model. I'm sure that it's possible to write a similar script generalizes to prefix-tuned adapter models, but I believe this would be beyond the scope of what this script aims to accomplish. |
|
Thank you @wjurayj for you help, I appreciate your help. |
|
Dear @wjurayj , |
|
After convering my finetuned model with LoRa to huggingface using this code the model acted as a pretrained model rather than a finetuned one. |
|
@awaelchli @carmocca @lantiga How can I get this contribition added to the codebase? |
|
FileNotFoundError: [Errno 2] No such file or directory: 'scripts/checkpoints/open-llama/tokenizer.model' Why is there always an error? I have downloaded the tokenizer.model and placed it in the 7B folder. |
This script will convert a checkpoint fine-tuned in Lit-LLaMA into a set of files that you can load & use within huggingface.