/ Модель

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

Контекст
32 768 токенов
Лицензия
MIT
Архитектура
ultravbert · dense
Базовая модель
UltraBERT-150M
Библиотека
transformers
Опубликована
15 окт 2026

UltraVBERT

Заполнение пропусковТекст → текст

Англоязычный мультимодальный энкодер UltraVBERT кодирует текст и изображения страниц для поиска по визуальным документам.

93скачиваний за 30 дней3лайкавеса обновлены18 окт 2026

Бенчмарки

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

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

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

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

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

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

UltraVBERT — англоязычный мультимодальный энкодер для поиска по визуальным документам, разработанный автором репозитория athrael-soju. Модель объединяет текстовый энкодер UltraBERT-150M и визуальный SigLIP2-B/16-512: она обрабатывает текст и изображения страниц вместе и формирует контекстные представления токенов. Полная модель содержит 293 млн параметров, а энкодер без MLM-головы — 254 млн; веса сохранены в bfloat16.

Модель предназначена прежде всего для построения поисковых представлений страниц документов и их содержимого. Процессор разбивает изображения страниц на плитки и может использовать до 28 × 64 = 1 792 визуальных токенов на страницу. UltraVBERT обучалась с masked language modelling на ответах диалогов, основанных на изображениях, с данными для OCR, документов, инструкций и преобразования скриншотов в код. Для загрузки требуется transformers версии 5.20 или выше и включение trust_remote_code.

Модель рассчитана на английский язык. В обучении использовались последовательности до 7 000 токенов и до трёх изображений. При превышении лимита плиток страницы уменьшаются, что может ухудшить читаемость мелкого текста. Лицензия — MIT.

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

  • поиск страниц в коллекции отсканированных документов
  • поиск по содержимому PDF и изображений страниц
  • извлечение релевантных страниц по текстовому запросу
  • поиск по документам с диаграммами и скриншотами

Ограничения

Модель рассчитана только на английский язык и обучалась на входах длиной до 7 000 токенов и до трёх изображений. При обработке страниц, превышающих лимит плиток, уменьшение изображения может размыть мелкий текст.

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

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

Открыть на Hugging Face

UltraVBERT

UltraVBERT is a 293M-parameter vision-language encoder built as a base for visual document retrievers. It combines the UltraBERT-150M text encoder with the SigLIP2-B/16-512 vision encoder to read page images and text together, producing a contextual embedding for every token.

Models

Architecture

SigLIP2 encodes each 512 px tile of a page into 1,024 patches. The connector merges every 4 x 4 block of patches into one token, so each tile becomes 64 tokens, and RMS-normalizes them to the scale of UltraBERT's word embeddings. UltraBERT then attends over image and text tokens together.

UltraVBERT extends ModernVBERT (arXiv 2510.01149) with UltraBERT (arXiv 2610.15028) in place of its Ettin-150M text encoder, a normalized connector, pages up to 3,072 px and 27 tiles instead of 2,048 px and 16, and an extra training stage on rendered text pages.

ComponentConfigurationParameters
Text encoderUltraBERT-150M: 24 layers, hidden size 768, 6 heads; 128-token sliding-window attention in 2 of every 3 layers; 40 added special tokens151,130,880
Vision encoderSigLIP2-B/16-512: 12 layers, 16 px patches, 512 px tiles93,520,128
Connector4 x 4 pixel shuffle, linear 12,288 to 768, RMSNorm9,437,952
MLM headtwo 768 x 768 layers and a 49,280-token output layer39,026,688
Total293,115,648

The encoder without the MLM head has 254M parameters. Weights are stored in bfloat16.

The processor resizes a page to a 3,072 px longest edge, shrinking it in 512 px steps until it fits 27 tiles, and adds a downscaled copy of the whole page, so a page uses at most 28 x 64 = 1,792 image tokens. For shorter sequences, set processor.image_processor.size = {"longest_edge": 2048} (at most 1,088 image tokens) or lower processor.image_processor.max_image_tiles.

Usage

Requires transformers>=5.20. The model code ships with the repository, so every load passes trust_remote_code=True.

import torch
from PIL import Image
from transformers import AutoModel, AutoModelForMaskedLM, AutoProcessor

processor = AutoProcessor.from_pretrained("athrael-soju/UltraVBERT", trust_remote_code=True)
page = Image.open("page.png")

# Predict a masked word from the page.
model = AutoModelForMaskedLM.from_pretrained(
    "athrael-soju/UltraVBERT", trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
)
inputs = processor(text="<image>The table reports revenue in <|mask|>.", images=[page], return_tensors="pt").to(model.device)
with torch.no_grad():
    logits = model(**inputs).logits
masked_logits = logits[inputs.input_ids == processor.tokenizer.mask_token_id]
print(processor.tokenizer.batch_decode(masked_logits.argmax(dim=-1)[:, None]))

# One 768-d embedding per text and image token.
encoder = AutoModel.from_pretrained(
    "athrael-soju/UltraVBERT", trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
)
inputs = processor(text="<image>", images=[page], return_tensors="pt").to(encoder.device)
with torch.no_grad():
    states = encoder(**inputs).last_hidden_state

AutoModelForSequenceClassification and AutoModelForTokenClassification add task heads on the same encoder.

Training

UltraVBERT is trained with masked language modelling on the answers of image-grounded conversations: half of the answer tokens are masked (80% <|mask|>, 10% random token, 10% unchanged).

  • DoRA adapters (rank 64, alpha 16) on both encoders and the MLM head, peak learning rate 1e-4
  • Connector trained in full at 1e-3; image tokens start at 10x the RMS of UltraBERT's word embeddings
  • The 40 added token embeddings trained directly
  • AdamW (beta2 0.95), weight decay 0.1, gradient clipping 1.0, bfloat16 autocast
StageStepsText tokensData
Reading3,6000.36BDocmatix pages and rendered RLHN-680K passages, half each
Mixture34,2068.9BThe mix below

The mixture stage uses a warmup-stable-decay schedule with a 1 - sqrt decay over the last 20% of steps. Pages train at a 1,024 px longest edge until the decay, then at random edges from 1,024 to 3,072 px.

CategoryShare of text tokensSources
Text instructions48.18%16 FineVision text subsets
OCR and documents16.21%Docmatix and 9 FineVision subsets
Screenshot to code16.71%4 FineVision subsets
Rendered text pages5.00%RLHN-680K passages
Charts5.00%8 FineVision subsets
Captioning3.13%2 FineVision subsets
Tables3.00%6 FineVision subsets
Reasoning and math1.61%7 FineVision subsets
Real-world VQA1.16%2 FineVision subsets and The Cauldron's TallyQA

Datasets: Docmatix, FineVision, The Cauldron and RLHN-680K. Subsets used:

CategorySubsets
Text instructionstext_code_feedback, text_codefeedback_filtered_instruction, text_infinitymath, text_mathinstruct, text_mathqa, text_mathstepdpo10k, text_numinamath_cot, text_openhermes_2_5, text_OpenMathInstruct-2, text_openorca, text_orcamath, text_pythoncode25k, text_pythoncodealpaca, text_ruozhiba, text_theoremqa, text_wizardlm_evol
OCR and documentsDocmatix, olmOCR-mix-0225-documents, CoSyn_400k_document, CoSyn_400k_diagram, SynthFormulaNet, latexformulas, k12_printing, tal_ocr_eng, ocrvqa, DoclingMatix
Screenshot to codeSynthCodeNet, datik, datikz, websight
ChartsCoSyn_400k_chart, Unichart, SynthChartNet, figureqa, mapqa, chart2text, mmc_instruct, plotqa
Captioningdensefusion_1m, localized_narratives
TablesCoSyn_400k_table, vqaonbd, robut_wikisql, robut_wtq, finqa, robut_sqa
Reasoning and mathCoSyn_400k_math, mavis_math_metagen, geomverse, geo170k(qa), geo170k(align), CoSyn_400k_circuit, CoSyn_400k_chemical
Real-world VQACoSyn_400k_graphic, mmevol, The Cauldron tallyqa

Limits

  • English only.
  • Trained on inputs of up to 7,000 tokens and 3 images.
  • Pages larger than the tile cap are downscaled, which can blur small print.

License

MIT. UltraBERT-150M and SigLIP2-B/16-512 are Apache-2.0; their license text is in LICENSE-APACHE. Training used passages from RLHN-680K (CC-BY-SA-4.0).

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

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

GPU в ailist

Универсальный рантайм · transformers · fill-mask

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
UltraVBertForMaskedLM
Ревизия весов
49807f3

0 моделей