alt.freeweights.embed / gme-Qwen2-VL-2B-Instruct
From: Alibaba-NLP <huggingface.co/Alibaba-NLP>Newsgroups: alt.freeweights.embedSubject:

gme-Qwen2-VL-2B-Instruct

Date: 2026-11-14Commit: 9cfa641Signed: 2DC28CC7B26A283B ✓

Sentence similarity model with 2.2B parameters. Safetensors weights, 8.85 GB in all. Published by Alibaba-NLP under Apache-2.0.

2.2B params8.85GBgme-Qwen2-VL-2B-Instructsafetensorspermissive
FactsParams2.2BSize8.85 GBFormatssafetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get Alibaba-NLP/gme-Qwen2-VL-2B-Instruct
# manifest sha256 3e53981c5dee… · 8.85 GB · 24 files
$ fw verify ./gme-Qwen2-VL-2B-Instruct Alibaba-NLP/gme-Qwen2-VL-2B-Instruct
From sourceHosted (signed)Alibaba-NLP/gme-Qwen2-VL-2B-InstructLast check: 2026-11-14 21:07 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of Qwen2-VL-2B-Instruct.

Works with

Evaluate with

Overview

Size
8.85 GB
Weights
8.84 GB (safetensors)
Parameters
2.2B
Formats
safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
24, each with a sha256
Publisher
Alibaba-NLP
Added
2026-11-14
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Base model: Qwen/Qwen2-VL-2B-Instruct

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:07 UTCpassed

Model card

From the publisher at commit 9cfa641. Shown as plain text with links; images open at the publisher.

Image: GME Logo

GME: General Multimodal Embedding

GME-Qwen2-VL-2B#

We are excited to present GME-Qwen2VL series of unified multimodal embedding models, which are based on the advanced Qwen2-VL multimodal large language models (MLLMs).

The GME models support three types of input: text, image, and image-text pair, all of which can produce universal vector representations and have powerful retrieval performance.

Key Enhancements of GME Models:

  • Unified Multimodal Representation: GME models can process both single-modal and combined-modal inputs, resulting in a unified vector representation. This enables versatile retrieval scenarios (Any2Any Search), supporting tasks such as text retrieval, image retrieval from text, and image-to-image searches.
  • High Performance: Achieves state-of-the-art (SOTA) results in our universal multimodal retrieval benchmark (UMRB) and demonstrate strong evaluation scores in the Multimodal Textual Evaluation Benchmark (MTEB).
  • Dynamic Image Resolution: Benefiting from Qwen2-VL and our training data, GME models support dynamic resolution image input.
  • Strong Visual Retrieval Performance: Enhanced by the Qwen2-VL model series, our models excel in visual document retrieval tasks that require a nuanced understanding of document screenshots. This capability is particularly beneficial for complex document understanding scenarios, such as multimodal retrieval-augmented generation (RAG) applications focused on academic papers.

Developed by: Tongyi Lab, Alibaba Group

Paper: GME: Improving Universal Multimodal Retrieval by Multimodal LLMs

Model List#

ModelsModel SizeMax Seq. LengthDimensionMTEB-enMTEB-zhUMRB
gme-Qwen2-VL-2B2.21B32768153665.2766.9264.45
gme-Qwen2-VL-7B8.29B32768358467.4869.7367.44

Usage#

Transformers

The remote code has some issues with transformers>=4.52.0, please downgrade or use sentence_transformers

from transformers import AutoModel
from transformers.utils.versions import require_version


require_version(
    "transformers<4.52.0",
    "The remote code has some issues with transformers>=4.52.0, please downgrade: pip install transformers==4.51.3"
)


t2i_prompt = 'Find an image that matches the given text.'
texts = [
    "The Tesla Cybertruck is a battery electric pickup truck built by Tesla, Inc. since 2023.",
    "Alibaba office.",
]
images = [
    'https://upload.wikimedia.org/wikipedia/commons/e/e9/Tesla_Cybertruck_damaged_window.jpg',
    'https://upload.wikimedia.org/wikipedia/commons/e/e0/TaobaoCity_Alibaba_Xixi_Park.jpg',
]


gme = AutoModel.from_pretrained(
    "Alibaba-NLP/gme-Qwen2-VL-2B-Instruct",
    torch_dtype="float16", device_map='cuda', trust_remote_code=True
)


# Single-modal embedding
e_text = gme.get_text_embeddings(texts=texts)
e_image = gme.get_image_embeddings(images=images)
print('Single-modal', (e_text @ e_image.T).tolist())
## Single-modal [[0.359619140625, 0.0655517578125], [0.04180908203125, 0.374755859375]]

# How to set embedding instruction
e_query = gme.get_text_embeddings(texts=texts, instruction=t2i_prompt)
# If is_query=False, we always use the default instruction.
e_corpus = gme.get_image_embeddings(images=images, is_query=False)
print('Single-modal with instruction', (e_query @ e_corpus.T).tolist())
## Single-modal with instruction [[0.429931640625, 0.11505126953125], [0.049835205078125, 0.409423828125]]

# Fused-modal embedding
e_fused = gme.get_fused_embeddings(texts=texts, images=images)
print('Fused-modal', (e_fused @ e_fused.T).tolist())
## Fused-modal [[1.0, 0.05511474609375], [0.05511474609375, 1.0]]

sentence_transformers

The encode function accept str or dict with key(s) in {'text', 'image', 'prompt'}.

Do not pass prompt as the argument to encode, pass as the input as a dict with a prompt key.

from sentence_transformers import SentenceTransformer


t2i_prompt = 'Find an image that matches the given text.'
texts = [
    "The Tesla Cybertruck is a battery electric pickup truck built by Tesla, Inc. since 2023.",
    "Alibaba office.",
]
images = [
    'https://upload.wikimedia.org/wikipedia/commons/e/e9/Tesla_Cybertruck_damaged_window.jpg',
    'https://upload.wikimedia.org/wikipedia/commons/e/e0/TaobaoCity_Alibaba_Xixi_Park.jpg',
]


gme_st = SentenceTransformer("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct")

# Single-modal embedding
e_text = gme_st.encode(texts, convert_to_tensor=True)
e_image = gme_st.encode([dict(image=i) for i in images], convert_to_tensor=True)
print('Single-modal', (e_text @ e_image.T).tolist())
## Single-modal [[0.356201171875, 0.06536865234375], [0.041717529296875, 0.37890625]]

# How to set embedding instruction
e_query = gme_st.encode([dict(text=t, prompt=t2i_prompt) for t in texts], convert_to_tensor=True)
# If no prompt, we always use the default instruction.
e_corpus = gme_st.encode([dict(image=i) for i in images], convert_to_tensor=True)
print('Single-modal with instruction', (e_query @ e_corpus.T).tolist())
## Single-modal with instruction [[0.425537109375, 0.1158447265625], [0.049835205078125, 0.413818359375]]

# Fused-modal embedding
e_fused = gme_st.encode([dict(text=t, image=i) for t, i in zip(texts, images)], convert_to_tensor=True)
print('Fused-modal', (e_fused @ e_fused.T).tolist())
## Fused-modal [[0.99951171875, 0.0556640625], [0.0556640625, 0.99951171875]]

Evaluation#

We validated the performance on our universal multimodal retrieval benchmark (UMRB, see Release UMRB) among others.

Single-modalCross-modalFused-modalAvg.
T→T (16)I→I (1)T→I (4)T→VD (10)I→T (4)T→IT (2)IT→T (5)IT→I (2)IT→IT (3)(47)
VISTA0.2B55.1531.9832.8810.1231.2345.8153.328.9726.2637.32
CLIP-SF0.4B39.7531.4259.0524.0962.9566.4153.3234.955.6543.66
One-Peace4B43.5431.2761.3842.965.5942.7228.296.7323.4142.01
DSE4.2B48.9427.9240.7578.2152.5449.6235.448.3640.1850.04
E5-V8.4B52.4127.3646.5641.2247.9554.1332.923.177.2342.52
GME-Qwen2-VL-2B2.2B55.9329.8657.3687.8461.9376.4764.5837.0266.4764.45
GME-Qwen2-VL-7B8.3B58.1931.8961.3589.9265.8380.9466.1842.5673.6267.44

The MTEB Leaderboard English tab shows the text embeddings performence of our model.

More detailed experimental results can be found in the paper.

Community support#

Fine-tuning#

GME models can be fine-tuned by SWIFT:

pip install ms-swift -U
# MAX_PIXELS settings to reduce memory usage
# check: https://swift.readthedocs.io/en/latest/BestPractices/Embedding.html
nproc_per_node=8
MAX_PIXELS=1003520 \
USE_HF=1 \
NPROC_PER_NODE=$nproc_per_node \
swift sft \
    --model Alibaba-NLP/gme-Qwen2-VL-2B-Instruct \
    --train_type lora \
    --dataset 'HuggingFaceM4/TextCaps:emb' \
    --torch_dtype bfloat16 \
    --num_train_epochs 1 \
    --per_device_train_batch_size 2 \
    --per_device_eval_batch_size 2 \
    --gradient_accumulation_steps $(expr 64 / $nproc_per_node) \
    --eval_steps 100 \
    --save_steps 100 \
    --eval_strategy steps \
    --save_total_limit 5 \
    --logging_steps 5 \
    --output_dir output \
    --lazy_tokenize true \
    --warmup_ratio 0.05 \
    --learning_rate 5e-6 \
    --deepspeed zero3 \
    --dataloader_num_workers 4 \
    --task_type embedding \
    --loss_type infonce \
    --dataloader_drop_last true

Limitations#

  • Single Image Input: In Qwen2-VL, an image could be converted into a very large number of visual tokens. We limit the number of visual tokens to 1024 to obtain a good training efficiency.

Due to the lack of relevant data, our models and evaluations retain one single image.

  • English-only Training: Our models are trained on english data only. Although the Qwen2-VL models are multilingual, the multilingual-multimodal embedding performance are not guaranteed.

We will extend to multi-image input, image-text interleaved data as well as multilingual data in the future version.

Redistribution and Use#

We encourage and value diverse applications of GME models and continuous enhancements to the models themselves.

  • If you distribute or make GME models (or any derivative works) available, or if you create a product or service (including another AI model) that incorporates them, you must prominently display Built with GME on your website, user interface, blog post, About page, or product documentation.
  • If you utilize GME models or their outputs to develop, train, fine-tune, or improve an AI model that is distributed or made available, you must prefix the name of any such AI model with GME.

Cloud API Services#

In addition to the open-source GME series models, GME series models are also available as commercial API services on Alibaba Cloud.

Note that the models behind the commercial APIs are not entirely identical to the open-source models.

Hiring#

We have open positions for Research Interns and Full-Time Researchers to join our team at Tongyi Lab. We are seeking passionate individuals with expertise in representation learning, LLM-driven information retrieval, Retrieval-Augmented Generation (RAG), and agent-based systems. Our team is located in the vibrant cities of Beijing and Hangzhou, offering a collaborative and dynamic work environment where you can contribute to cutting-edge advancements in artificial intelligence and machine learning. If you are driven by curiosity and eager to make a meaningful impact through your work, we would love to hear from you. Please submit your resume along with a brief introduction to dingkun.ldk@alibaba-inc.com.

Citation#

If you find our paper or models helpful, please consider cite:

@misc{zhang2024gme,
      title={GME: Improving Universal Multimodal Retrieval by Multimodal LLMs}, 
      author={Zhang, Xin and Zhang, Yanzhao and Xie, Wen and Li, Mingxin and Dai, Ziqi and Long, Dingkun and Xie, Pengjun and Zhang, Meishan and Li, Wenjie and Zhang, Min},
      year={2024},
      eprint={2412.16855},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={http://arxiv.org/abs/2412.16855}, 
}

Files

24 files · 8.85 GBWeights 8.84 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 24 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
1_Pooling/config.json316 Bf25c114f765f96fb30c843ec709c35ee6e92f24a782b8f37d95e29a32a7da5d6
README.md101 KBc46d467403a84b8c61a55f7fa0ea80ac7a81f1d554139a3c1187d60873f31734
added_tokens.json392 B7fa54985b58718a8fdb4f4d97484c4bd908db114847675e4bf3afe3e1d5d7bd4
chat_template.json1.05 KBad60d90252ed0b0705ba14e2d0ad0fec0beac1ea955642b54059b36052d8bc96
config.json1.25 KBdd18f3c69154bc6ccd1f55a6e0d0831c7edde2e29fee19d7ee91ad0e2e9f24c4
config_sentence_transformers.json161 B85db35e7374940a9db49841a1bd07a16e8b934ab7fe3f9430e9f7498e9e026a4
custom_st.py8.62 KB3581b891b5f480e7ec17562fcd0df662cedb2d62ae194e9f5f0cbf3984f4b309
generation_config.json249 Bff59fad29b00eab5bef61be17668b46b3eac6e12d452b85ec88ad8f8cdfd4e59
gme_inference.py13.2 KB10a4bf65193df6d801b7827d2a24d0e7b75114f77dc147d0cc71401d2efa3535
images/gme_logo.png526 KB852d3f21c088f7a29e0982e2f404ffed1d7344d9088668ff7015f324d40f1439
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
model-00001-of-00003.safetensors4.05 GBce525de1d47307ebf63285ce4f2f80ca8ffffd94235b2151585e5714307e4e99
model-00002-of-00003.safetensors4.06 GB7b42b76064f5d14ee9d0390f9a1f3571fc66eae4f40764f818cb5e9aafc5d6f5
model-00003-of-00003.safetensors727 MBe3f1342fe1dd7df1582be00ebd45557316015050ae2edb841e61150825f16adc
model.safetensors.index.json56.4 KB047653b243143a82b3460c187826bebca04ec93b48f0bb19109d5674a124cbca
modeling_gme_qwen2vl.py13.3 KBb21b5071fcbba5ab71bfa2667c82f446c32d7d27b42148c7571c5d59f940e8c4
modules.json341 B2923a704ccbddb790764375fc1353bb2d3f8766f95e7224aae050432c4c72d6c
preprocessor_config.json347 Bb5eaad0c2815f07631535dcc58f3c462b0d73693638ad21d19f3c50820eae1cc
results.json15.9 KB285321070f2c4d18dc9267a66f8579a0e0c3f5bf3288ca80e89471b0aee9b9c9
special_tokens_map.json613 B76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
tokenizer.json7.03 MB0b233397aeabcb441562b9186b921d6449dfc5f7bc567880400dc3662d264f02
tokenizer_config.json4.26 KBc715bebf439296530bc63ac45461f3f70d6e45b561ebf02d3a21091e07b698a1
vocab.json2.78 MBca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
9cfa6413f7 pinned now manifest updated, same commit2026-11-14 21:07 UTC24 files · 8.85 GB
9cfa6413f72026-11-14 21:07 UTC24 files · 8.85 GB

Use it

$ fw get Alibaba-NLP/gme-Qwen2-VL-2B-Instruct
# manifest sha256 3e53981c5dee… · 8.85 GB · 24 files
$ fw verify ./gme-Qwen2-VL-2B-Instruct Alibaba-NLP/gme-Qwen2-VL-2B-Instruct
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/Alibaba-NLP/gme-Qwen2-VL-2B-Instruct.json --dir ./gme-Qwen2-VL-2B-Instruct $ python3 fw.py verify ./gme-Qwen2-VL-2B-Instruct ./Alibaba-NLP__gme-Qwen2-VL-2B-Instruct.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/gme-Qwen2-VL-2B-Instruct --revision 9cfa6413f704a7c1cf5064d240748e10c876b286 --local-dir ./gme-Qwen2-VL-2B-Instruct
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", revision="9cfa6413f704a7c1cf5064d240748e10c876b286") model = AutoModel.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", revision="9cfa6413f704a7c1cf5064d240748e10c876b286", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gme-Qwen2-VL-2B-Instruct", revision="9cfa6413f704a7c1cf5064d240748e10c876b286") vectors = model.encode(["Hello"])

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
c46d467403a84b8c61a55f7fa0ea80ac7a81f1d554139a3c1187d60873f31734
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: Alibaba-NLP <huggingface.co/Alibaba-NLP>Newsgroups: alt.freeweights.embedSubject: gme-Qwen2-VL-2B-InstructDate: 2026-11-14Commit: 9cfa641Signed: 2DC28CC7B26A283B ✓
Upstream
Alibaba-NLP/gme-Qwen2-VL-2B-Instruct
Pinned commit
9cfa6413f704a7c1cf5064d240748e10c876b286
Manifest
gme-Qwen2-VL-2B-Instruct.json · .minisig
Manifest sha256
3e53981c5dee2c662d9350499fd59c20d3e100913ade61fefc5b4022e8a82c1a
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:07 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/gme-Qwen2-VL-2B-Instruct.json $ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/gme-Qwen2-VL-2B-Instruct.json.minisig $ minisign -Vm gme-Qwen2-VL-2B-Instruct.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

Qwen/Qwen2-VL-2B-Instruct · this model is a finetune of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/gme-Qwen2-VL-2B-Instruct
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. gme-Qwen2-VL-2B-Instruct.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens