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
We are working with LLaMA which is not supported in the old version of Adapter-Transformers. So we decided to use the beta (Adapters branch). The issue is, it's unclear how to load the llama language modeling head. By default, the model is loaded without any head, which is a problem. This kind of approach made a lot of sense in the BERT era, but it's unclear if it's an intuitive solution now when people want to fine-tune language models with their original head on.
Hello @Guitaricet, yes you are correct the add_causal_lm_head adds a randomly initialized language modelling head. What you can do here is you can use the original transformers class and initialize it afterwards:
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf")
adapters.init(model)
This should solve the problem (let me know if it does not).
Details
Hello!
We are working with LLaMA which is not supported in the old version of Adapter-Transformers. So we decided to use the beta (
Adapters
branch). The issue is, it's unclear how to load the llama language modeling head. By default, the model is loaded without any head, which is a problem. This kind of approach made a lot of sense in the BERT era, but it's unclear if it's an intuitive solution now when people want to fine-tune language models with their original head on.Here's what we tried:
so, it seems like this way the added head is randomly initialized.
Could you help us to get the original llama head weights?
The text was updated successfully, but these errors were encountered: