InternLM / InternLM-XComposer

InternLM-XComposer2 is a groundbreaking vision-language large model (VLLM) excelling in free-form text-image composition and comprehension.
1.91k stars 120 forks source link

Using in transformers results in errors #331

Open HuFY-dev opened 3 weeks ago

HuFY-dev commented 3 weeks ago

Error: You are using a model of type internlmxcomposer2 to instantiate a model of type internlm. This is not supported for all configurations of models and can yield errors.

Replicate:

from transformers import AutoModel
model = AutoModel.from_pretrained("internlm/internlm-xcomposer2-vl-7b", trust_remote_code=True)

Environment: tried transformers=4.37.2, 4.39.1, 4.41.2