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, 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
Update config.json
Browse files- config.json +6 -3
config.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "Alibaba-NLP/gme-Qwen2-VL-2B-Instruct",
|
| 3 |
-
"architectures": [
|
|
|
|
|
|
|
|
|
|
| 4 |
"auto_map": {
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
},
|
| 8 |
"attention_dropout": 0.0,
|
| 9 |
"bos_token_id": 151643,
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "Alibaba-NLP/gme-Qwen2-VL-2B-Instruct",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Qwen2VLForConditionalGeneration",
|
| 5 |
+
"GmeQwen2VL"
|
| 6 |
+
],
|
| 7 |
"auto_map": {
|
| 8 |
+
"AutoConfig": "modeling_gme_qwen2vl.GmeQwen2VLConfig",
|
| 9 |
+
"AutoModel": "modeling_gme_qwen2vl.GmeQwen2VL"
|
| 10 |
},
|
| 11 |
"attention_dropout": 0.0,
|
| 12 |
"bos_token_id": 151643,
|