Add trust_remote_code support via AutoModel integration
#22
by whybe-choi - opened
Hi Qwen team, thank you for releasing this great embedding model!
I'd like to propose adding trust_remote_code support so that the community can load the model more conveniently.
The current repository provides scripts/qwen3_vl_embedding.py as a helper wrapper,
but this requires users to manually clone the repo and import from the script directly β
which adds friction compared to the standard HuggingFace workflow.
By adding trust_remote_code support with proper auto_map configuration, users in the
community can now load the model with just:
from transformers import AutoModel, AutoProcessor
model = AutoModel.from_pretrained("Qwen/Qwen3-VL-Embedding-2B", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-Embedding-2B", trust_remote_code=True)
embeddings = model.encode(inputs)