Instructions to use Alibaba-NLP/gme-Qwen2-VL-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Alibaba-NLP/gme-Qwen2-VL-7B-Instruct with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gme-Qwen2-VL-7B-Instruct", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use Alibaba-NLP/gme-Qwen2-VL-7B-Instruct with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-7B-Instruct", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-7B-Instruct", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Can load and run model in GME-2B, but can't run in GME-7B version
I want load model in vllm;
vllm == 0.9.2
torch == 2.7.0
transformers == 4.52.0
i can load model and run gme-2b when i use transformers == 4.52.0, but load gme-7b had some issue -> Should have a video_processor_type key in its video_preprocessor_config.json of config.json, or one of the following model_type keys in its config.json: instructblip, instructblipvideo, internvl, llava_next_video, llava_onevision, qwen2_5_omni, qwen2_5_vl, qwen2_vl, smolvlm, video_llava
i have tried transformers == 4.51.3, it also had some issue when i load gme-7b -> ModuleNotFoundError: No module named 'transformers.models.qwen2_vl.video_processing_qwen2_vl'
so confused!
Hope anyone can help me ..