This repository contains the official code and data for VLM2Vec-V2, a unified framework for learning powerful multimodal embeddings across diverse visual formats including images, videos, and visual documents.
Our work introduces MMEB-V2, a comprehensive benchmark with 57 tasks designed to systematically evaluate embedding models across these modalities. VLM2Vec-V2 sets a new state-of-the-art, outperforming strong baselines across all categories.
This is an open-source project, and we welcome contributions from the community. We are particularly interested in additions of new functionalities, support for new datasets, bug fixes, and improvements to documentation. Please feel free to open an issue to discuss your ideas or submit a pull request!
🚨 Major V2 Update Alert (June 2025) 🚨
This repository has been updated to V2, which is a complete overhaul of the codebase. The previous VLM2Vec code has been archived and can be found in the
v1branch.Warning: Please back up any local work before proceeding. If you have a local clone from before this update, you must reset your main branch to sync with the new code.
For detailed instructions, please see the "How to Upgrade to V2" section below.
Your feedback on this transition process is highly appreciated. If you run into any problems, please let us know by opening an issue.
📜 View Older Updates
CHANGELOG.md. If any changes conflict with previously supported features, please feel free to raise an issue here. Thank you in advance!original and diverse_instruction. The original split is provided to support the reproduction of our paper results. The diverse_instruction split includes paraphrased instructions for each task, designed to enhance instruction diversity and improve the model's robustness to unseen instructions and tasks. Moving forward, our future releases will primarily use the diverse_instruction split.experiments/release).src/dataset/).git stash.main branch and reset your local copy to match it. # Make sure you are on your main branch first
git checkout main
# Fetch all recent updates from the remote and remove stale branch references
git fetch --all --prune
# Force your local main branch to match the new remote main branch
git reset --hard origin/main
VLM2Vec-V2 fine-tunes a state-of-the-art Vision-Language Model (VLM) using instruction-guided contrastive training. The model learns to produce a single, powerful fixed-dimensional embedding for any combination of text, image, video, and document inputs.
For current V2 models, we use Qwen2-VL as the model backbone, which capably handles interleaved sequences of text and visuals, variable resolutions, and long-form inputs like videos and visual documents.
V1 checkpoints
We introduce MMEB-V2, an expanded benchmark that includes 81 total datasets covering images, videos, and visual documents. - New Video Tasks: video retrieval, moment retrieval, video classification, and video QA. - New visual document task: visual document retrieval. - Check out MMEB-v2 datasets at Huggingface.

Please refer to experiments/release_public/data/download_data.sh.
Our training process uses a curated dataset from three main sources: video-language data (LLaVA-Hound), visual document data (Vidore, VisRAG), and image-text data (MMEB-train). We use an interleaved sub-batching strategy for stable and effective contrastive learning.
How to run: please see examples in experiments/public/train.
DDP inference on multiple GPUs is supported. The whole evaluation process is streamlined and can be finished within hours.
How to run: please see examples in experiments/public/eval.
$ claude mcp add VLM2Vec \
-- python -m otcore.mcp_server <graph>