Sentence Similarity
sentence-transformers
Safetensors
Transformers
English
Chinese
qwen2_vl
image-text-to-text
mteb
Qwen2-VL
vidore
custom_code
Eval Results (legacy)
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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update gme_inference.py (#15)
Browse files- Update gme_inference.py (cd3297f4dbd887b20d6d47e5e6030199ff903532)
Co-authored-by: Tanvir Ahmed <AhVir@users.noreply.huggingface.co>
- gme_inference.py +2 -2
gme_inference.py
CHANGED
|
@@ -304,8 +304,8 @@ if __name__ == '__main__':
|
|
| 304 |
"The Tesla Cybertruck is a battery electric pickup truck built by Tesla, Inc. since 2023."
|
| 305 |
]
|
| 306 |
images = [
|
| 307 |
-
'https://
|
| 308 |
-
'https://
|
| 309 |
]
|
| 310 |
|
| 311 |
gme = GmeQwen2VL("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct")
|
|
|
|
| 304 |
"The Tesla Cybertruck is a battery electric pickup truck built by Tesla, Inc. since 2023."
|
| 305 |
]
|
| 306 |
images = [
|
| 307 |
+
'https://upload.wikimedia.org/wikipedia/commons/e/e9/Tesla_Cybertruck_damaged_window.jpg',
|
| 308 |
+
'https://upload.wikimedia.org/wikipedia/commons/9/95/2024_Tesla_Cybertruck_Foundation_Series%2C_front_left_%28Greenwich%29.jpg',
|
| 309 |
]
|
| 310 |
|
| 311 |
gme = GmeQwen2VL("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct")
|