/ Модель

Характеристики

Контекст
128 000 токенов
Параметры
3,1 млрд
Размер весов
7,5 ГБ
Лицензия
MIT
Архитектура
qwen2_5_vl · dense
Библиотека
transformers
Опубликована
13 июн 2025

MoCa-Qwen25VL-3B

Классификация изображений без дообученияИзображение, текст → label10 профессий

Мультимодальная модель на базе Qwen2.5-VL для создания эмбеддингов и поиска по текстам, изображениям и документам.

363скачиваний за 30 дней6лайковвеса обновлены1 июл 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки1

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • Vidore2ESGReportsHLRetrieval

    main_score

    Результат

    0,623

    MTEB

    Публичная таблицаревизия совпадает

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MoCa-Qwen25VL-3B — мультимодальная модель для получения двунаправленных эмбеддингов, разработанная авторами работы MoCa. Она основана на Qwen2.5-3B-VL-Instruct и предназначена для поиска и сопоставления текстов и изображений, в том числе для поиска по документам и длинным парам «запрос — документ». Модель принимает текст, изображения и их чередующиеся комбинации, а выдаёт эмбеддинги для мультимодального поиска и классификации изображений без заранее заданных классов.

Модель семейства Qwen2.5-VL имеет плотную архитектуру и 3,1 млрд параметров; нативный контекст — 128 000 токенов. В README заявлены высокие результаты на MMEB и ViDoRe-v2, а также обобщение на данные вне обучающей выборки. Обучение включало непрерывное предобучение на мультимодальных данных и контрастивную настройку на парах текстов и мультимодальных данных. Доступна под лицензией MIT.

Сценарии применения

  • поиск изображений по текстовому запросу
  • поиск текстов и документов по смыслу
  • поиск по визуально насыщенным документам
  • сопоставление текстовых запросов с изображениями
  • классификация изображений без фиксированного набора классов

Ограничения

README сообщает о результатах на MMEB и ViDoRe-v2, но не приводит численные значения в доступном описании. Языковая поддержка явно подтверждена только для английского.

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MoCa-Qwen25VL-3B

MoCa: Modality-aware Continual Pre-training Makes Better Bidirectional Multimodal Embeddings. Haonan Chen, Hong Liu, Yuping Luo, Liang Wang, Nan Yang, Furu Wei, Zhicheng Dou, arXiv 2025

This repo presents the MoCa-Qwen25VL series of multimodal embedding models. The model is trained based on Qwen2.5-3B-VL-Instruct.

🏠 Homepage | 💻 Code | 🤖 MoCa-Qwen25VL-7B | 🤖 MoCa-Qwen25VL-3B | 📚 Datasets | 📄 Paper

Highlights

  • SOTA performance on MMEB (General Multimodal) and surpassing many strong baselines on ViDoRe-v2 (Document Retrieval).
  • Supports texts, images, and interleaved input.
  • Generalize on out-of-distribution data well due to innovative methods.
    • Continually pre-trained on 30B interleaved high quality data with modality-aware reconstruction objectives.
    • Contrastive fine-tuning on diverse data spanning long-form query-document pairs, curated multimodal pairs, and real-world text pairs.

Train/Eval Data

Experimental Results

Performances on MMEB and ViDoRe-v2 benchmarks.

Usage

Transformers

Below is an example we adapted from VLM2Vec.

git clone https://github.com/haon-chen/MoCa.git
cd MoCa
pip install -r requirements.txt
pip install flash-attn==2.5.8
from transformers import AutoProcessor, AutoConfig
from src.vlm_backbone.qwen2_5_vl_embed.qwen2_5_vl_embed import Qwen2_5ForEmbedding
import torch
from PIL import Image
import torch.nn.functional as F


def compute_similarity(q_reps, p_reps):
    return torch.matmul(q_reps, p_reps.transpose(0, 1))

model_name = "moca-embed/MoCa-Qwen25VL-3B"
processor_name = "Qwen/Qwen2.5-VL-3B-Instruct"

# Load Processor and Model
processor = AutoProcessor.from_pretrained(processor_name)
config = AutoConfig.from_pretrained(model_name)
model = Qwen2_5ForEmbedding.from_pretrained(
    model_name, config=config, 
    torch_dtype=torch.bfloat16,
    attn_implementation='flash_attention_2',
    bidirectional=True,
).to("cuda")
model.eval()
# Image + Text -> Text
inputs = processor(text='<|vision_start|><|image_pad|><|vision_end|>Represent the given image with the following question: What is in the image\n', images=[Image.open(
    'figures/example.jpg')], return_tensors="pt").to("cuda")
qry_output = F.normalize(model(**inputs, return_dict=True, output_hidden_states=True), dim=-1)

string = 'A cat and a dog'
text_inputs = processor(text=string, return_tensors="pt").to("cuda")
tgt_output = F.normalize(model(**text_inputs, return_dict=True, output_hidden_states=True), dim=-1)
print(string, '=', compute_similarity(qry_output, tgt_output))
## A cat and a dog = tensor([[0.4824]], device='cuda:0', dtype=torch.bfloat16)

string = 'A cat and a tiger'
text_inputs = processor(text=string, return_tensors="pt").to("cuda")
tgt_output = F.normalize(model(**text_inputs, return_dict=True, output_hidden_states=True), dim=-1)
print(string, '=', compute_similarity(qry_output, tgt_output))
## A cat and a tiger = tensor([[0.3613]], device='cuda:0', dtype=torch.bfloat16)

# Text -> Image
inputs = processor(text='Find me an everyday image that matches the given caption: A cat and a dog.\n', return_tensors="pt").to("cuda")
qry_output = F.normalize(model(**inputs, return_dict=True, output_hidden_states=True), dim=-1)

string = '<|vision_start|><|image_pad|><|vision_end|>Represent the given image.\n'
tgt_inputs = processor(text=string, images=[Image.open('figures/example.jpg')], return_tensors="pt").to("cuda")
tgt_output = F.normalize(model(**tgt_inputs, return_dict=True, output_hidden_states=True), dim=-1)
print(string, '=', compute_similarity(qry_output, tgt_output))
## <|vision_start|><|image_pad|><|vision_end|>Represent the given image. = tensor([[0.3945]], device='cuda:0', dtype=torch.bfloat16)

inputs = processor(text='Find me an everyday image that matches the given caption: A cat and a tiger.\n', return_tensors="pt").to("cuda")
qry_output = F.normalize(model(**inputs, return_dict=True, output_hidden_states=True), dim=-1)

string = '<|vision_start|><|image_pad|><|vision_end|>Represent the given image.\n'
tgt_inputs = processor(text=string, images=[Image.open('figures/example.jpg')], return_tensors="pt").to("cuda")
tgt_output = F.normalize(model(**tgt_inputs, return_dict=True, output_hidden_states=True), dim=-1)
print(string, '=', compute_similarity(qry_output, tgt_output))
## <|vision_start|><|image_pad|><|vision_end|>Represent the given image. = tensor([[0.3184]], device='cuda:0', dtype=torch.bfloat16)

Citation

If you use this model in your research, please cite the associated paper.

@article{chen2025moca,
  title={MoCa: Modality-aware Continual Pre-training Makes Better Bidirectional Multimodal Embeddings},
  author={Chen, Haonan and Liu, Hong and Luo, Yuping and Wang, Liang and Yang, Nan and Wei, Furu and Dou, Zhicheng},
  journal={arXiv preprint arXiv:2506.23115},
  year={2025}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · zero-shot-image-classification

Нельзя запустить

Для архитектуры qwen2_5_vl нет загрузчика под задачу zero-shot-image-classification.

Класс архитектуры
Qwen2_5ForEmbedding
Ревизия весов
89b0e5a

0 моделей