/ Модель

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

Контекст
8 192 токена
Лицензия
MIT
Архитектура
modernvbert · dense
Базовая модель
ettin-encoder-150m
Опубликована
11 авг 2025

modernvbert

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

Дообученный мультимодальный энкодер ModernVBERT для поиска релевантных страниц в визуальных документах по текстовому запросу.

0скачиваний за 30 дней49лайковвеса обновлены30 мар 2026

Бенчмарки

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

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

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

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

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

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

ModernVBERT — компактный мультимодальный энкодер из семейства ModernVBERT, разработанный авторами проекта ModernVBERT. Эта версия дообучена на базе jhu-clsp/ettin-encoder-150m для поиска по визуальным документам. Модель кодирует текстовые запросы и изображения документов для извлечения релевантных страниц; относится к архитектуре dense encoder и использует позднее взаимодействие между представлениями текста и изображения.

Семейство ModernVBERT насчитывает модели примерно на 250 млн параметров. Авторы сообщают о результатах на визуальных бенчмарках поиска документов, сопоставимых с моделями примерно в десять раз крупнее, и об эффективном выводе на CPU. Репозиторий содержит веса safetensors. Лицензия — MIT. Для работы с официальной реализацией требуется transformers версии 5.3.0 или новее.

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

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

Ограничения

Оценки описаны авторами на визуальных бенчмарках; качество для других наборов документов отдельно не подтверждено. Для официальной реализации нужна transformers версии 5.3.0 или новее.

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

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

Открыть на Hugging Face

ModernVBERT

bg

[!WARNING] 🚨 Migration guide to official transformers modeling

ModernVBERT is part of transformers since v5.3.0!

This becomes the official modeling for the model.

If you have a model based on the initial modeling, you can adapt the weigths to the new format supported by transformers. We provide a conversion script in this repo, you simply need to run:

python convert_model_weights.py \
 /path/to/legacy-modernvbert \
 /path/to/converted-modernvbert \

The converted model:

  • merges the split token embedding tables
  • rewrites model.connector.modality_projection.proj.weight
  • nests model.vision_model... under model.vision_model.vision_model...

Model

This is the model card for modernvbert.

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 (ColModernVBERT in the paper) is the late-interaction version that is fine-tuned for visual document retrieval tasks, our most performant model on this task.
  • bimodernvbert (BiModernVBERT in the paper) 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

You can use these models directly with the transformers library:

pip install transformers>=5.3.0

🏎️ 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:

pip install flash-attn

Here is an example of masked token prediction using ModernVBERT:

import torch
from transformers import AutoTokenizer, ModernVBertForMaskedLM, AutoProcessor
from PIL import Image
from huggingface_hub import hf_hub_download

model_id = "ModernVBERT/modernvbert"

processor = AutoProcessor.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = ModernVBertForMaskedLM.from_pretrained(
            model_id,
            torch_dtype=torch.float32, # use torch_dtype=torch.bfloat16 for flash attention
)

image = Image.open(hf_hub_download("HuggingFaceTB/SmolVLM", "example_images/rococo.jpg", repo_type="space"))
text = "This [MASK] is on the wall."

# Create input messages
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image"},
            {"type": "text", "text": text}
        ]
    },
]

# Prepare inputs
prompt = processor.apply_chat_template(messages)
inputs = processor(text=prompt, images=[image], return_tensors="pt")

# Inference
with torch.no_grad():
  outputs = model(**inputs)

# To get predictions for the mask:
masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
predicted_token_id = outputs.logits[0, masked_index].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)
print("Predicted token:", predicted_token) # Predicted token: painting

Evaluation

table Our results can be found in the arXiv preprint. When finetuned for visual document retrieval tasks, ModernVBERT matches the performance of models nearly 10x larger on visual document benchmarks. Additionally, it provides an interesting inference speed on CPU compared to the models of similar performance.

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

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

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

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

Ревизия весов
1d1bece

0 моделей