Instructions to use Alibaba-NLP/gme-Qwen2-VL-2B-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-2B-Instruct with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gme-Qwen2-VL-2B-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-2B-Instruct with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Training code release
Hi, thanks for your awesome work! By the way, are you planning to release the training code?
We won't be able to release the training code in the short term (at least for the next three months). We main focus right now is on optimizing the model. I appreciate your understanding!
Good job, it's proved that it is benefit in I2I Single-Modal Retrieval after my experiment! So I wonder know when will the training code be released?
We won't be able to release the training code in the short term (at least for the next three months). We main focus right now is on optimizing the model. I appreciate your understanding!
Looking forward to this job for open source
https://github.com/modelscope/ms-swift/blob/main/examples/train/embedding/train_gme.sh
Thanks, Is there a way using Llama-factory?