/ Модель

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

Контекст
8 192 токена
Лицензия
MIT
Архитектура
modernvbert · dense
Базовая модель
colmodernvbert-base
Библиотека
colpali
Опубликована
20 окт 2025

colmodernvbert-merged

Языковая модельИзображение, текст → embedding

ColModernVBERT — многовекторный энкодер для поиска страниц визуальных документов по текстовым запросам.

0скачиваний за 30 дней6лайковвеса обновлены20 авг 2026

Бенчмарки

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

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

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

В подключённых источниках результатов для этой модели пока нет.

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

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

ColModernVBERT — компактный мультимодальный энкодер семейства ModernVBERT, разработанный командой ModernVBERT и дообученный для поиска по визуальным документам. Это версия с объединёнными LoRA-адаптерами; модель использует позднее взаимодействие в стиле ColBERT и формирует многовекторные представления для запросов и страниц документов. Размер семейства составляет 250 млн параметров.

Модель предназначена для поиска релевантных страниц в сканах и других визуальных документах по текстовому запросу. Её можно использовать через MultiVectorEncoder в Sentence Transformers для кодирования запросов и документов и оценки сходства. По данным авторов, на визуальных документных бенчмарках она сопоставима с моделями примерно в десять раз крупнее и обеспечивает хорошую скорость CPU-инференса среди моделей близкого качества.

Для обработки изображений страниц применяются блоки патч-токенов и глобальный патч; стандартная интерпретация прямоугольной сетки патчей не поддерживается. Авторы рекомендуют Flash Attention 2 для высокой пропускной способности на GPU; для ColPali Engine на момент публикации требовалась отдельная ветка репозитория. Лицензия — MIT.

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

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

Ограничения

Интерпретация сетки патчей через get_n_patches не реализована из-за разбиения страниц на блоки патч-токенов. Для высокой пропускной способности на GPU рекомендован Flash Attention 2, а интеграция с ColPali Engine на момент публикации требовала отдельной ветки.

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

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

Открыть на Hugging Face

ColModernVBERT

Model

This is the model card for ColModernVBERT, the late-interaction version of ModernVBERT that is fine-tuned for visual document retrieval tasks, our most performant model on this task. This is the version with LoRA adapters merged with the base model.

Table of Contents

  1. Overview
  2. Usage
  3. Evaluation
  4. License
  5. Citation

Overview

The ModernVBERT suite is a suite of compact 250M-parameter vision-language encoders, achieving state-of-the-art performance in this size class, matching the performance of models up to 10x larger.

For more information about ModernVBERT, please check the arXiv preprint.

Models

  • ColModernVBERT is the late-interaction version that is fine-tuned for visual document retrieval tasks, our most performant model on this task.
  • BiModernVBERT is the bi-encoder version that is fine-tuned for visual document retrieval tasks.
  • ModernVBERT-embed is the bi-encoder version after modality alignment (using a MLM objective) and contrastive learning, without document specialization.
  • ModernVBERT is the base model after modality alignment (using a MLM objective).

Usage

Sentence Transformers

ColModernVBERT can be loaded as a multi-vector (ColBERT-style late interaction) retriever with Sentence Transformers via the MultiVectorEncoder, exposing the familiar encode_query / encode_document / similarity API.

pip install "sentence-transformers[image]>=6.0.0"
from sentence_transformers import MultiVectorEncoder

model = MultiVectorEncoder("ModernVBERT/colmodernvbert-merged")

queries = [
    "What is the variable represented on the y-axis of the graph?",
    "Total outlay is maximum in which year?",
]
images = [
    "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc1.jpg",
    "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc2.jpg",
    "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc3.jpg",
    "https://huggingface.co/datasets/sentence-transformers/example-documents/resolve/main/doc4.jpg",
]

query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(images)
print(f"Query 0 shape:    {tuple(query_embeddings[0].shape)}")
print(f"Document 0 shape: {tuple(document_embeddings[0].shape)}")
# Query 0 shape:    (26, 128)
# Document 0 shape: (1149, 128)

scores = model.similarity(query_embeddings, document_embeddings)
print(scores)
# tensor([[16.7778, 10.3712, 11.8420,  9.0534],
#         [ 7.3722, 12.0618,  8.1477,  7.9563]])

[!NOTE] sentence_transformers.multi_vector_encoder.interpretability.get_n_patches raises NotImplementedError for this model: like other Idefics3-style split-image processors, each page is split into sub-patch token blocks plus a global patch, so the token grid is not a simple rectangle.

ColPali Engine

🏎️ If your GPU supports it, we recommend using ModernVBERT with Flash Attention 2 to achieve the highest GPU throughput. To do so, install Flash Attention 2 as follows, then use the model as normal:

For now, the branch for using colmdernvbert is not yet merged in the official colpali repo, you need to clone the repo and checkout on the right branch to use it.

git clone https://github.com/illuin-tech/colpali.git
cd colpali
git checkout vbert
pip install -e .

Here is an example of masked token prediction using ModernVBERT:

import torch
from colpali_engine.models import ColModernVBert, ColModernVBertProcessor
from PIL import Image
from huggingface_hub import hf_hub_download

model_id = "ModernVBERT/colmodernvbert-merged"

processor = ColModernVBertProcessor.from_pretrained(model_id)
model = ColModernVBert.from_pretrained(
            model_id,
            torch_dtype=torch.float32,
            trust_remote_code=True
)

image = Image.open(hf_hub_download("HuggingFaceTB/SmolVLM", "example_images/rococo.jpg", repo_type="space"))
text = "This is a text"

# Prepare inputs
text_inputs = processor.process_texts([text])
image_inputs = processor.process_images([image])

# Inference
q_embeddings = model(**text_inputs)
corpus_embeddings = model(**image_inputs)

# Get the similarity scores
scores = processor.score(q_embeddings, corpus_embeddings)

print("Similarity scores:", scores)

Evaluation

License

We release the ModernVBERT model architectures, model weights, and training codebase under the MIT license.

Citation

If you use ModernVBERT in your work, please cite:

@misc{teiletche2025modernvbertsmallervisualdocument,
      title={ModernVBERT: Towards Smaller Visual Document Retrievers}, 
      author={Paul Teiletche and Quentin Macé and Max Conti and Antonio Loison and Gautier Viaud and Pierre Colombo and Manuel Faysse},
      year={2025},
      eprint={2510.01149},
      archivePrefix={arXiv},
      primaryClass={cs.IR},
      url={https://arxiv.org/abs/2510.01149}, 
}

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

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

GPU в ailist

Универсальный рантайм · colpali

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

Поиск по документам-картинкам пока не поддерживается.

Ревизия весов
a8b921f

0 моделей