-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hi, thanks for your great work on LLM2CLIP
I noticed that in the config.json of microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned, there is an auto_map field pointing to:
"auto_map": {
"AutoModel": "McGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp--modeling_llama_encoder.LlamaEncoderModel"
}
This makes AutoModel.from_pretrained() load the model class from the McGill-NLP repository via trust_remote_code=True and HuggingFace’s dynamic module mechanism.
However, this repo already includes a local implementation of LlamaEncoderModel in modeling_llama_encoder.py. I tried deleting auto_map and loading the checkpoint with the local class instead. The model loads successfully with no missing or unexpected keys.
May I ask what the original motivation was for adding this cross-repo auto_map? Is there any functional reason the model must be loaded from
the McGill-NLP repo rather than using the local implementation here?
Thanks again for the great work!