/ Модель

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

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

UltraVBERT

Заполнение пропусковТекст → текст9 профессий
544скачиваний за 30 дней14лайковвеса обновлены27 окт 2026

Описание модели

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

Мультимодальный англоязычный энкодер для поиска по визуальным документам, сопоставляющий текстовые запросы с содержимым страниц.

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

Модель предназначена для визуального поиска по страницам документов и сопоставления запросов с их содержимым. Страница обрабатывается плитками размером 512 пикселей; поддерживается до 27 плиток и до 1 664 визуальных токенов на страницу. Во время обучения использовались последовательности до 7 000 токенов и до трёх изображений. Модель рассчитана на английский язык. Крупные страницы уменьшаются до лимита плиток, из-за чего мелкий текст может терять чёткость; заявленное обучение охватывает до трёх изображений на вход.

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

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

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

UltraVBERT

UltraVBERT is a 247M-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 and produces a contextual embedding for every text and image token.

Models

Architecture

SigLIP2 encodes each 512 px tile of a page into 1,024 patches. The connector merges each 4 x 4 block of patches into one token, giving 64 tokens per tile, then projects each token to UltraBERT's hidden size and RMS-normalizes it. UltraBERT then attends over image and text tokens together.

UltraVBERT builds on ModernVBERT (arXiv 2510.01149). It replaces the Ettin-150M text encoder with UltraBERT (arXiv 2610.15028), normalizes the connector output, raises the page limit from 2,048 px and 16 tiles to 3,072 px and 27 tiles, and adds a training stage on rendered text pages.

ComponentConfigurationParameters
Text encoderUltraBERT-150M: 24 layers, hidden size 768, 6 heads; local attention over ±128 tokens in 2 of every 3 layers; 40 added special tokens151,130,880
Vision encoderSigLIP2-B/16-512 without its pooling head: 12 layers, 16 px patches, 512 px tiles86,433,024
Connector4 x 4 pixel shuffle, linear 12,288 to 768, RMSNorm9,437,952
MLM headUltraBERT's released head: two 768 x 768 layers and an output layer extended to 49,280 tokens39,026,688
Total286,028,544

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

The processor scales a page to 3,072 px on its longest edge, reduces that in 512 px steps until the page fits in 27 tiles, and adds a downscaled view of the whole page. A grid holds at most six tiles per side, so the largest that fits is 5 x 5, for at most 26 x 64 = 1,664 image tokens per page. 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.21, which supports UltraVBERT natively (docs). On 5.20.x, pass trust_remote_code=True to load the code in this repository.

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

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

# Predict a masked word from the page.
model = AutoModelForMaskedLM.from_pretrained(
    "athrael-soju/UltraVBERT", 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", 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 in image-grounded conversations, with half of the answer tokens 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 are resized to a 1,024 px longest edge until the decay begins, then to random longest 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. The UltraBERT-150M and SigLIP2-B/16-512 components are Apache-2.0, with their license text in LICENSE-APACHE. Training used passages from RLHN-680K (CC-BY-SA-4.0).

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

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

GPU в ailist

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

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

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

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

0 моделей