[Request] Push adapter model in another repo
As per the recent PEFT integration in transformers (available on main branch): https://github.com/huggingface/transformers/pull/25077 / https://huggingface.co/docs/transformers/main/en/peft for users that have PEFT and transformers from source installed from_pretrained
will load the adapters, load the base model specified in the adapter config and inject the trained adapters in-place to the model. This should lead to the same thing as doing:
from peft import AutoPeftModelForCausalLM
model = AutoPeftModelForCausalLM.from_pretrained("NousResearch/Nous-Hermes-Llama2-70b")
but instead of returning a PeftModel
it will return a AutoModelForCausalLM
. I suggest you push the adapter weights and config in a separate repository to clearly distinguish between the merged final model and the adapter weights.
As per the recent PEFT integration in transformers (available on main branch): https://github.com/huggingface/transformers/pull/25077 / https://huggingface.co/docs/transformers/main/en/peft for users that have PEFT and transformers from source installed
from_pretrained
will load the adapters, load the base model specified in the adapter config and inject the trained adapters in-place to the model. This should lead to the same thing as doing:
from peft import AutoPeftModelForCausalLM model = AutoPeftModelForCausalLM.from_pretrained("NousResearch/Nous-Hermes-Llama2-70b")
but instead of returning a
PeftModel
it will return aAutoModelForCausalLM
. I suggest you push the adapter weights and config in a separate repository to clearly distinguish between the merged final model and the adapter weights.
Will do in a bit