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

gme-Qwen2-VL-7B-Instruct

Date: 2026-11-14Commit: e54cb53Signed: 2DC28CC7B26A283B ✓

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

8.3B params33.2GBgme-Qwen2-VL-7B-Instructsafetensorspermissive
FactsParams8.3BSize33.2 GBFormatssafetensorsTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get Alibaba-NLP/gme-Qwen2-VL-7B-Instruct
# manifest sha256 2ae10a62f608… · 33.2 GB · 28 files
$ fw verify ./gme-Qwen2-VL-7B-Instruct Alibaba-NLP/gme-Qwen2-VL-7B-Instruct
From sourceHosted (signed)Alibaba-NLP/gme-Qwen2-VL-7B-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-7B-Instruct.

Works with

Evaluate with

Overview

Size
33.2 GB
Weights
33.2 GB (safetensors)
Parameters
8.3B
Formats
safetensors
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
28, 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-7B-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 e54cb53. Shown as plain text with links; images open at the publisher.

Image: GME Logo

GME: General Multimodal Embedding

gme-Qwen2-VL-7B#

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.2768.4164.45
gme-Qwen2-VL-7B8.29B32768358467.4871.3667.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-7B-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.279296875, 0.0002658367156982422], [0.06427001953125, 0.304443359375]]

# 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.32861328125, 0.026336669921875], [0.09466552734375, 0.3134765625]]

# 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.0308685302734375], [0.0308685302734375, 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-7B-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.27880859375, 0.0005745887756347656], [0.06500244140625, 0.306640625]]

# 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.328369140625, 0.0269927978515625], [0.09521484375, 0.316162109375]]

# 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.0311737060546875], [0.0311737060546875, 1.0009765625]]

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-7B-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

28 files · 33.2 GBWeights 33.2 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 28 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
1_Pooling/config.json314 Bfbc1a52d820fd20d117fba57408fc3088e9632be9768f5d0a1e410a55df43c58
README.md102 KBae511f81d69bab664f04cb03338885c42141c508c27cb7805f0ea3ce37cd2d7e
added_tokens.json392 B7fa54985b58718a8fdb4f4d97484c4bd908db114847675e4bf3afe3e1d5d7bd4
chat_template.json1.05 KBad60d90252ed0b0705ba14e2d0ad0fec0beac1ea955642b54059b36052d8bc96
config.json1.25 KBff6d9c21e3da8d53f5644e7e184fb5ca327a05d17bfebfc32f01fa70f895f3ef
config_sentence_transformers.json161 B85db35e7374940a9db49841a1bd07a16e8b934ab7fe3f9430e9f7498e9e026a4
custom_st.py8.60 KB8bad4757d515647179459e34983cc1291ee25853ed7813962bff37cb32b77f1c
generation_config.json220 B34fe059b8ec90ee2cecb45d4ff0db005647143dc1165495f51b535527d53bd82
merges.txt1.67 MB8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5
model-00001-of-00009.safetensors2.70 GB334ad0fd71d668135c344d62536c9dfb2beb70eaf31d09ff5e5e036b2bc61af6
model-00002-of-00009.safetensors4.10 GBeb8884d4887b29550099f9f9f0a709f24aea0d3d1196f3f7182bb3194e7fd763
model-00003-of-00009.safetensors4.07 GB6e3464e772389e31a2fc3ed019b20234a2ce59ecca218afdbe2c1b461d7cdc43
model-00004-of-00009.safetensors4.00 GB2938a6a48a61e6c02d5bea812919d24d479207e1a2c6e686489e5d7641f91ba3
model-00005-of-00009.safetensors4.07 GB80bccbe372e233c5e6dd1e720a135fa5ad676a73bca99a59aab23e44b79da91a
model-00006-of-00009.safetensors4.05 GBc494191f68029820aba82a39b60f027531e74ab4738229fdd1ca0d0721d6edbc
model-00007-of-00009.safetensors4.00 GB5ec70f11b6184e1f981b954746ef435e7067d399eee097c7096e3b11c881c556
model-00008-of-00009.safetensors4.00 GB7e171cb9be36ffe532c709e321149c26c259348e046341f43dbe62bb5d896931
model-00009-of-00009.safetensors2.18 GB9622a9474f974a77ff85f2fd5c8ecd4eb85815a4644af58546baf2124e1b3eab
model.safetensors.index.json56.5 KB3a78dc5c8c4ca8359fadab70d9c732c714a1e948350b33aa1067861e2db86316
modeling_gme_qwen2vl.py13.3 KBb21b5071fcbba5ab71bfa2667c82f446c32d7d27b42148c7571c5d59f940e8c4
modules.json341 B2923a704ccbddb790764375fc1353bb2d3f8766f95e7224aae050432c4c72d6c
preprocessor_config.json347 Bb5eaad0c2815f07631535dcc58f3c462b0d73693638ad21d19f3c50820eae1cc
results.json15.7 KB965dd9684e0cff29769ba04a136ee7600efa1fd9463076369fbc5f311c16ae86
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
e54cb53a76 pinned now manifest updated, same commit2026-11-14 21:07 UTC28 files · 33.2 GB
e54cb53a762026-11-14 21:07 UTC28 files · 33.2 GB

Use it

$ fw get Alibaba-NLP/gme-Qwen2-VL-7B-Instruct
# manifest sha256 2ae10a62f608… · 33.2 GB · 28 files
$ fw verify ./gme-Qwen2-VL-7B-Instruct Alibaba-NLP/gme-Qwen2-VL-7B-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-7B-Instruct.json --dir ./gme-Qwen2-VL-7B-Instruct $ python3 fw.py verify ./gme-Qwen2-VL-7B-Instruct ./Alibaba-NLP__gme-Qwen2-VL-7B-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-7B-Instruct --revision e54cb53a76dba4895a7a2f88fc8021f3679ed4f1 --local-dir ./gme-Qwen2-VL-7B-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-7B-Instruct", revision="e54cb53a76dba4895a7a2f88fc8021f3679ed4f1") model = AutoModel.from_pretrained("Alibaba-NLP/gme-Qwen2-VL-7B-Instruct", revision="e54cb53a76dba4895a7a2f88fc8021f3679ed4f1", 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-7B-Instruct", revision="e54cb53a76dba4895a7a2f88fc8021f3679ed4f1") 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
ae511f81d69bab664f04cb03338885c42141c508c27cb7805f0ea3ce37cd2d7e
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-7B-InstructDate: 2026-11-14Commit: e54cb53Signed: 2DC28CC7B26A283B ✓
Upstream
Alibaba-NLP/gme-Qwen2-VL-7B-Instruct
Pinned commit
e54cb53a76dba4895a7a2f88fc8021f3679ed4f1
Manifest
gme-Qwen2-VL-7B-Instruct.json · .minisig
Manifest sha256
2ae10a62f6084c009c149c1f5fc769435aebd88dab049474e8a1595a4854e02b
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-7B-Instruct.json $ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/gme-Qwen2-VL-7B-Instruct.json.minisig $ minisign -Vm gme-Qwen2-VL-7B-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-7B-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-7B-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-7B-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