Downloads · 30 days
0
thaitea/laya-vision-modernvbert-250m
laya-vision-modernvbert-250m is a visual question answering model from thaitea. Use it for the visual question answering task on the model card, and read the license before you ship it in a product. It is set up for laya. The card lists the license as cc-by-nc-sa-4.0.
This model makes calibrated, typed decisions about one or more images plus optional text. It answers choice, score and noul (yes/no probability) questions in one forward pass, with no text generation.
Downloads · 30 days
0
Access
Public
Updated Sep 21, 2026
Parameters
267M
1.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors1.1 GB · 100%
From the Hugging Face model README
This model makes calibrated, typed decisions about one or more images plus optional text. It answers choice, score and noul (yes/no probability) questions in one forward pass, with no text generation.
It adds image input to Laya by replacing Laya's ModernBERT text encoder with ModernVBERT, a bidirectional ModernBERT-150M plus SigLIP2 vision encoder. Because the backbone is bidirectional, Laya's original readout carries over unchanged: each option is scored from a [MASK] marker that sees the whole sequence. Laya's predict(state, questions) API, proper-scoring-rule training and temperature calibration are also unchanged. A sibling checkpoint on a causal backbone is thaitea/laya-vision-smolvlm-256m.
docs/modernvbert-cauldron.md.Needs transformers >= 5.3 for the ModernVBERT classes.
git clone https://github.com/r33drichards/laya-vision && pip install -e ./laya-vision torchvision "transformers>=5.3"
import laya
from PIL import Image
agent = laya.load_vlm("thaitea/laya-vision-modernvbert-250m")
result = agent.predict(
{"image": Image.open("photo.jpg"), "note": "customer says it arrived broken"},
{
"damaged": {"type": "noul", "instructions": "Does the item in the photo look damaged?"},
"category": {"type": "choice", "instructions": "What kind of item is this?",
"criteria": ["electronics", "clothing", "furniture", "food", "other"]},
},
)
result["answers"]["damaged"]["noul"] # calibrated P(true)
result["answers"]["category"]["choice"] # top option; see ["probabilities"], ["confidence"]
A state may carry several images: {"images": [left, right]} (the model was trained on NLVR2 pairs).
Scores are on full validation splits. "Calibrated" uses the per-type temperatures stored in vlm_agent_config.json, which are applied automatically. The first three rows are the official splits the SmolVLM checkpoint reports on; the model saw those datasets' train rows only as 3 of its 19 training subsets.
| Dataset | Question type | Chance | Accuracy | ECE raw | ECE calibrated |
|---|---|---|---|---|---|
| A-OKVQA (n=1,138) | 4-way choice | 25% | 65.2% | 0.214 | 0.064 |
| ScienceQA, image subset (n=2,097) | 2–5-way choice | ~36% | 79.0% | 0.114 | 0.058 |
| VQAv2 yes/no (n=5,000)* | noul | 50% | 71.8% | 0.134 | 0.037 |
| All 22 validation sets (n=22,886), the three above plus a 5% holdout of each training subset | 71.8% | 0.103 | 0.022 |
* The VQAv2 train/val split is a re-split of the official VQAv2 validation set by image (the only official split with answers), so these numbers are not comparable to published VQAv2 results.
Per-subset holdout accuracy ranges from 93% (DVQA) and 86% (OCR-VQA) down to 40% (RAVEN, 8-way) and 27% (InterGPS geometry); the full table is in training_metrics.json and in the repo's docs/modernvbert-cauldron.md. Against the SmolVLM checkpoint, which was trained for 3 epochs on exactly the three official sets, this model is 3.4 points better on A-OKVQA and 7.6 and 1.6 points worse on ScienceQA and VQAv2 yes/no.
predict call and shared by every question.n_permutations=4) gives 66.4%.[CLS]User:<image tokens> <type> question: <instructions>[SEP][MASK] option 1[MASK] option 2 ...[SEP]<state>[SEP]. Each option is scored from its [MASK], as in Laya's text model; the act head pools [CLS].training_metrics.json has every evaluation from the run.score questions are untrained. There was no ordinal image data, so their outputs are meaningless.The weights are released under CC BY-NC-SA 4.0, because the training data includes ScienceQA, which uses that license. The base model, ModernVBERT, is MIT. The Cauldron's subsets each carry their own licenses; consult the dataset card before commercial use of any derivative. The code is Apache 2.0.