Vision-language models: how images become tokens

How a language model is given eyes: connectors, tiles against native resolution, 3-D positions, reading text, boxes, video, training recipes, hallucination and the cost of image tokens. SmolVLM-500M and Qwen3.5-0.8B run here on synthetic and public-domain images; published results kept apart. Child page of Topic: generative-and-multimodal. Data as of October 2026. Reading: 33 min, plus 11 in closed details.

The idea in one screen

A vision-language model (VLM) cuts an image into patches, encodes each patch as a vector, and a small connector turns those vectors into image tokens of the language model’s width that sit in the sequence like words. Every design choice is about those tokens: how many, cut from which pixels, at which positions, and trained to mean what; each one costs context, cache and time like any other token.

Fig. 1: one 512 × 512 photo becomes 1,088 image tokens in SmolVLM and 256 in Qwen3.5

  1. The photo. The root’s 512 × 512 test cat (CC0) goes into two small open VLMs, SmolVLM-500M (back, blue) and Qwen3.5-0.8B (front, purple). Every count in the figure is measured on the real processors and models (2026-10-17) measured.
  2. Processor. SmolVLM enlarges the photo to 2,048 × 2,048 and cuts 4 × 4 tiles of 512 plus a 512 global view of the whole image; Qwen3.5 keeps it at 512 × 512, already a multiple of 32. The views are drawn as the processors produced them, decoded back from pixel_values.
  3. Vision encoder. Each view is cut into 16-pixel patches, 32 × 32 per view, one vector of 768 numbers each: 17 × 1,024 = 17,408 patch vectors in SmolVLM, 1,024 in Qwen3.5. The encoder is the Vision encoders page’s subject; everything after it is this page’s.
  4. Connector. SmolVLM lays each 4 × 4 block of patch vectors side by side and maps it with one matrix: 64 tokens per view, 1,088 image tokens. Qwen3.5 merges 2 × 2 blocks through an MLP: 256. One square is one token, so the two walls are to scale.
  5. Language model. The text joins the image tokens (grey squares). SmolVLM reads a 1,142-token prompt with 1-D positions, 0 to 1,141; Qwen3.5 reads 277 tokens, and since each image token gets a row and a column, its (t, h, w) positions end at 36: an image advances the counter by its side, not its token count (section 2a).

You need: what a vision transformer, CLIP and SigLIP produce (Vision encoders), how a decoder reads a sequence and why it caches keys and values (The transformer from zero), and RoPE (Positional Encodings). Besides SmolVLM, the small VLM the whole topic measures, this page runs a second model, Qwen3.5-0.8B (Apache 2.0, 1.75 GB in bfloat16), chosen because it differs from SmolVLM exactly where this page teaches: native resolution instead of tiles, 3-D positions instead of 1-D, trained to output boxes and read video, and a hybrid language model whose cache grows in only 6 of 24 layers.

Patch
a small square of pixels (14 or 16 on a side) that the encoder turns into one vector.
Connector
the trained module between encoder and language model: a projector, a set of learned queries, or a merge of neighbouring patches.
Image token
one vector of the language model’s width that stands for part of the image; it takes a slot in the sequence (or, in cross-attention designs, is read from outside it).
Tile, AnyRes
cutting a large image into fixed-size squares the encoder was trained on, plus a shrunken whole view.
Native resolution
feeding the image at (nearly) its own size, so the token count follows the pixel count.
M-RoPE
rotary positions with separate time, row and column parts, so an image token knows where it sat.
Grounding
answering with a place in the image, usually a bounding box written as numbers in the text.

Labels: measured = run for this page on an Apple M1 Pro (PyTorch MPS, bfloat16, greedy decoding, 2026-10-17); paper = stated by the cited authors; vendor = a model card or blog; derived = arithmetic on these, formula shown. Two small models on synthetic images are a probe, not a benchmark: one question is several percentage points. The 3D figures turn when dragged and play by themselves once in view; any control stops them.

1. Connectors: five ways to hand patches to a language model

The encoder gives a grid of vectors: 576 vectors of 1,024 numbers for LLaVA-1.5’s CLIP ViT-L at 336 pixels, or 1,024 vectors of 768 numbers per 512-pixel tile for SmolVLM. The language model expects tokens of its own width (4,096 numbers for a 7B Llama, 960 for SmolVLM’s, 1,024 for Qwen3.5-0.8B’s) and pays for every token it reads. A connector must make the vectors readable (in the language model’s space), few (cheap) and faithful (small text and positions survive); the five designs trade those three.

Fig. 2: same photo, five connectors; only the merge decides how many tokens the language model pays for

  1. Projector (LLaVA-1.5). CLIP ViT-L/14 at 336 pixels gives 24 × 24 = 576 patch vectors of 1,024 numbers (second-to-last block, [CLS] dropped). A 2-layer MLP maps each one to 4,096 numbers on its own: 576 in, 576 out, nothing merged. The MLP is about 21.0M parameters (1,024 × 4,096 + 4,096 × 4,096 weights plus biases) derived.
  2. Query transformer (BLIP-2). A frozen ViT at 224 pixels with 14-pixel patches: 16 × 16 patches plus [CLS] = 257 vectors. 32 learned queries, the same for every image, cross-attend to all of them through a BERT-sized Q-Former (188M parameters paper); a linear layer maps their 32 outputs to the language model’s width.
  3. Resampler and cross-attention (Flamingo). A Perceiver Resampler’s 64 learned latents read a frozen NFNet’s features (the grid is drawn schematically) and come out as 64 visual tokens whatever the input size. New gated cross-attention layers between the frozen language-model layers read them, so the sequence holds text only: the image costs 0 context tokens.
  4. Pixel shuffle and tiles (SmolVLM). The photo is enlarged to 2,048 and cut into 16 tiles plus a global view: 17 × 1,024 = 17,408 patch vectors of 768. Each 4 × 4 block is laid side by side (12,288 numbers) and one 12,288 × 960 matrix (11.8M parameters measured) maps it to the language model’s width: 64 tokens per view, 1,088 in all.
  5. 2 × 2 merger at native resolution (Qwen3.5). The photo stays 512 × 512: 32 × 32 = 1,024 patch vectors of 768. Each patch is layer-normalised, each 2 × 2 block concatenated (3,072 numbers), and a 2-layer MLP (3,072 to 3,072 to 1,024; 12.6M parameters, counted from the checkpoint measured) maps it: 256 tokens, each with a row and a column (section 2a).
  6. What each design pays in context. To scale: 576, 32, 0 (Flamingo’s 64 sit outside the sequence), 1,088 and 256 image tokens. Every token in the sequence is attended to like a word and cached for the rest of the conversation.

One square is one token of the language model’s width, the same size in every step. Grids and counts come from each model’s configuration or paper; SmolVLM’s and Qwen3.5’s are measured on the same 512 × 512 photo, whose views are the processors’ own.

Projector (LLaVA): the trade-off. The cheapest connector to train (LLaVA’s first stage trains only it) and the most faithful, since every patch keeps its own token; but the token count is the patch count, so resolution is paid for quadratically. LLaVA-1.5 reads the encoder’s second-to-last block and drops the [CLS] token (the Vision encoders page measures why a late, not last, layer is better). Right when images are few and small.

Query transformer (BLIP-2’s Q-Former). A fixed set of learned queries (parameters, the same for every image) attend to the frozen encoder’s features: 32 output vectors of 768 against 257 × 1,024 frozen features for ViT-L/14. Thirty-two tokens whatever the image is cheap, but the paper itself calls it “an information bottleneck between the frozen image encoder and the frozen LLM”: fine text, counts and positions must squeeze through, and the Q-Former needs its own pretraining stage (section 6). It suits a frozen language model and a tight budget, not documents.

Resampler and gated cross-attention (Flamingo). A Perceiver Resampler turns however many features into 64 visual outputs; new gated cross-attention blocks between frozen language-model layers read them, each output multiplied by tanh(α) with α initialised to 0, so training starts exactly at the frozen language model. Context stays free (many images or long video cost no sequence length); the price is new layers and an architecture serving stacks support less well. Who attends to whom under cross-attention and under a projector, as attention masks beside eight other designs: section 6 of Native multimodal and any-to-any models.

Merging neighbours (pixel shuffle, patch merger). Lay each block of neighbouring patch vectors side by side into one longer vector, then project: nothing is averaged away, and the projector learns to read several positions out of one vector. InternVL 1.5 cuts tokens to a quarter (a 448 × 448 tile becomes 256 tokens); SmolVLM merges 4 × 4 = 16 (1,024 to 64 per tile); Qwen2-VL merges 2 × 2 with an MLP, so a 224 × 224 image is (224 / 14)² / 4 = 64 tokens plus start and end markers, the paper’s “66 tokens” derived. A fixed compression with no extra stage, combined with tiling or native resolution: today’s default. SmolVLM’s paper reports that “smaller VLMs benefit from more aggressive compression (r=4)”; section 8 measures what happens when tokens are merged further without retraining.

DesignHow the image gets inTokens per imageExample
Projectoreach patch vector mapped to the language model’s width by a linear layer or a 2-layer MLP; nothing merged576 (one 336-pixel view, 24 × 24 patches of 14) derivedLLaVA-1.5 (Liu et al., 2023)
Query transformer32 learned queries read the patches through cross-attention; their outputs are projected and prepended32 paperBLIP-2 (Li et al., 2023)
Resampler + cross-attention64 learned latents summarise the features; new gated cross-attention layers inside a frozen language model read them; the image never enters the sequence64 per image, outside the context paperFlamingo (Alayrac et al., 2022)
Merge neighbours, tile4 or 16 neighbouring patch vectors laid side by side into one (pixel shuffle), then projected; large images cut into tiles plus a thumbnail256 per 448-pixel tile, 1 to 12 tiles (InternVL 1.5); 64 per 512-pixel tile, 1,088 for any square (SmolVLM)InternVL 1.5 (Chen et al., 2024), SmolVLM
Native resolutionthe image resized only to a multiple of 32 pixels; 2 × 2 neighbours merged by an MLP; positions in 3-D (time, row, column)one per 32 × 32 pixels: 256 for 512 × 512, 4,096 for 2,048 × 2,048 measuredQwen2-VL onward (Wang et al., 2024), Qwen3.5
The one controlled comparison: once the backbones can adapt, tokens in the sequence beat cross-attention

Idefics2 (Laurençon et al., May 2024, section 3.2 and Table 3) paper: same backbones, same data, same updates; average score over its benchmarks.

ArchitectureBackbonesAvg. score
Tokens in the sequence, no resamplerfrozen51.8
Tokens in the sequence, with resamplerfrozen60.3
Cross-attentionfrozen66.7
Cross-attentionLoRA67.3
Tokens in the sequence, with resamplerLoRA69.5

With frozen backbones cross-attention wins; with LoRA (full unfreezing “would yield loss divergences”) tokens in the sequence win, “even though the latter has more parameters”. That is why almost every open VLM since 2024 puts image tokens in the sequence. The same paper’s learned resampler adds 8.5 points (60.3 − 51.8) while cutting tokens “from 729 to 64”, with “no gains when using more than 64 visual tokens” (Table 4: 71.2 at 128, 71.7 at 64).

The designs in the papers’ own words, and two numbers in Idefics2’s prose that do not match its table (provenance)
  • LLaVA: first “a simple linear layer to connect image features into the word embedding space” (Liu et al., April 2023, section 4.1), then in LLaVA-1.5 “a two-layer MLP” which “can improve LLaVA’s multimodal capabilities” (October 2023, section 3.3) paper.
  • BLIP-2 (Li et al., January 2023, section 3) paper: “we use 32 queries where each query has a dimension of 768”; the output “(32×768) is much smaller than the size of frozen image features (e.g. 257×1024 for ViT-L/14)”; the Q-Former is initialised from BERT-base, has cross-attention “inserted every other transformer block”, and “contains 188M parameters”; a fully connected layer projects its outputs, which are “prepended to the input text embeddings” as “soft visual prompts”.
  • Flamingo (Alayrac et al., April 2022, sections 2.1 to 2.3, checked word for word) paper: the resampler “produces a fixed number of visual outputs (64)”; α is “a layer-specific learnable scalar initialized to 0”; each text token “attends to the visual tokens of the image that appeared just before it”. The largest model builds on the 70B Chinchilla language model and is called Flamingo-80B; DeepMind’s announcement calls it “an 80B parameter VLM” (DeepMind blog, 28 April 2022).
  • InternVL 1.5 (section 3.1): “a simple pixel shuffle to reduce the number of visual tokens to one-quarter”, so “a 448×448 image is represented by 256 visual tokens”. Qwen2-VL (section 2.1): “a simple MLP layer is employed after the ViT to compress adjacent 2×2 tokens into a single token” paper.
  • Idefics2’s prose against its Table 3 derived: the text says cross-attention “performs 7 points better” (table: 66.7 − 60.3 = 6.4) and LoRA gives “a 12.9 points increase under the fully autoregressive architecture” (table: 69.5 − 60.3 = 9.2; the 0.6 for cross-attention matches). The ranking holds either way; quote the table. In its frozen setting about 15% (in the sequence) and 25% (cross-attention) of all parameters are trained.
Inside the encoder: does a VLM inherit SigLIP 2’s outlier tokens? (measured; SmolVLM’s retrained encoder has none)

The Vision encoders page found that SigLIP 2 B/16 at 224 pixels has a few patch tokens with 15 to 22 times the median norm at fixed grid positions in every image (the “high-norm tokens” registers were invented to absorb). A VLM passes every patch to its connector, so such tokens would be a fixed tax on every image. Measured with the same statistic (the last block’s output before the final LayerNorm, each patch’s norm over the median of its view), one dot per test image measured:

  • SigLIP 2 B/16 (the root’s and the sibling’s checkpoint): at 224 pixels every image has a patch 15 to 23 times the median, at fixed positions (row, column) (0,13) and (3,13) in 16 of 16 images and (0,11) in 5 (the sibling, with its own preprocessing, lists (0,1), (0,13) and (3,13)); at 512 pixels (32 × 32 grid, position table interpolated) 18 to 24 times, at (0,30), (0,31) and (1,30) in all 16.
  • The public SigLIP base checkpoint at 512, the shape SmolVLM’s encoder starts from: milder fixed outliers, 4.5 to 6.1 times, at (2,4) in 11, (29,4) in 10, (3,4) in 9.
  • Inside SmolVLM: the largest ratio over all 272 views (16 images × 17) is 5.3; only 6 patches exceed 5, at 6 distinct positions; after the final LayerNorm those patches are 0.66 to 0.69 times the median, and after the projector no token exceeds 3.6 times.
  • Qwen3.5’s encoder (12 blocks of width 768, interpolated position table plus 2-D rotary positions; the Qwen3-VL report says its towers start from SigLIP-2, the Qwen3.5 card does not say): largest ratio 3.1 to 19.7 per image, 0 to 276 of 1,024 patches above 5, mostly on synthetic images with large flat areas, at positions that follow the content; only (1,1) repeats in more than half the images (11 of 16).

Outliers are a property of how an encoder was trained, not of vision transformers as such. A connector that merges neighbours carries them into tokens, so check your own encoder with this one statistic before adding registers or dropping tokens by norm. The What the model saw tab shades every token by this ratio.

2. Resolution: tiles against native resolution

An encoder trained on 224 or 384-pixel squares sees a phone screenshot or an A4 page squashed into that square: thin text vanishes and the aspect ratio is wrong. One token per patch at full size fixes it at a cost that grows with the pixel count. Four answers have been used, in this order. Fig. 3 walks one photo through the two this page runs; the table after it shows what each does to a 1,920 × 1,080 screenshot.

Fig. 3: same 3:2 photo; SmolVLM stretches it into tiles, Qwen3.5 keeps its shape

  1. The photo. Scikit-image’s rocket, 640 × 427 pixels (public domain), a 3:2 photo. The figure is to scale: a floor square is 256 pixels.
  2. SmolVLM resizes. The long side goes to 2,048 (× 3.20), then the short side is rounded up to whole 512-pixel tiles: 2,048 × 1,536. The photo is stretched, its shape going from 1.50 to 1.33, and a 512 × 512 global view of the whole image is added, squashed to a square.
  3. SmolVLM: tiles to tokens. 12 tiles and the global view, 13 views of 32 × 32 patches; pixel shuffle makes 64 tokens per view (one grid cell each): 832 image tokens. They enter as one run per view, each after a row and column tag, with 1-D positions: the text after the image starts at position 864, 877 tokens in all.
  4. Qwen3.5 keeps the shape. Resized only until both sides are multiples of 32: 640 × 416 (shape 1.50 to 1.54), no tiles and no global view; 40 × 26 = 1,040 patches of 16 pixels (each patch also spans 2 identical frames).
  5. Qwen3.5 merges 2 × 2. 20 × 13 = 260 image tokens in one block with 3-D positions (t, h, w): the text after it continues at position 24, the largest image position plus one, not 264. Same photo: 832 tokens against 260.

Both models’ real processors measured; the views are decoded back from the pixel_values they produced. SmolVLM: stretched to 2,048 × 1,536, 12 tiles + a global view = 832 tokens; Qwen3.5: 640 × 416, shape kept, 260 tokens.

ApproachWhat happens to a 1,920 × 1,080 screenshotSource
Fixed squaresquashed to 336 × 336: 576 tokens, aspect ratio lostLLaVA-1.5 (config: image size 336, patch 14)
A few grids (AnyRes)best of 2 × 2, 1 × {2, 3, 4}, {2, 3, 4} × 1 tiles of 336 plus a downscaled view; “up to 672x672, 336x1344, 1344x336”LLaVA-NeXT (blog, 30 January 2024) vendor
Dynamic tilingthe closest of “35 possible combinations of aspect ratios formed by 1 to 12 tiles” of 448 pixels, plus a 448 thumbnail: here 8 tiles (4 × 2) + 1 = 9 views, 2,304 tokens measured with the processorInternVL 1.5 (section 3.3) paper; InternVL3-1B-hf processor
Fixed tiles, long side firstlong side scaled to 2,048, short side rounded up to whole 512 tiles (stretched by a third): 12 tiles + global = 832 tokensSmolVLM processor, measured (root VLM lab recordings)
Native resolutionkept at 1,920 × 1,088 (both sides rounded to multiples of 32): 68 × 120 patches, 2,040 tokens measured with the processorQwen2-VL “Naive Dynamic Resolution” (section 2.1); Qwen3.5-0.8B processor

How native resolution works: three changes. (1) The image is resized only until both sides are multiples of the merged patch (32 pixels for Qwen3.5: 16-pixel patches, 2 × 2 merge), with its pixel count kept between a minimum and a maximum (Qwen3.5’s processor: 65,536 to 16,777,216 pixels, that is 64 to 16,384 tokens); the rule is smart_resize (transformers v5.20.1, models/qwen2_vl/image_processing_qwen2_vl.py line 63), ported in the Token budget tab and checked against the processor on 24 sizes. (2) The encoder’s fixed position table is replaced or supplemented by 2-D RoPE (rotation by row and by column), so any grid is legal: Qwen2-VL “modified ViT by removing the original absolute position embeddings and introducing 2D-RoPE” paper. (3) The language model is told where each token sat, through 3-D positions (2a below).

What the budgets do to answers measured. On the root’s 30 questions SmolVLM gets 24 at 64, 26 at 320, 26 at 1,088 image tokens. Qwen3.5 gets 23 at 64, 24 at 256, 27 at 1,024 when a sentence such as “There are 3 red circles” counts as the number, but only 21, 21, 22 under the root lab’s strict rule, because it often ignores “Answer with a number” and writes a sentence: one score measures seeing, the other following the format. More tokens helped Qwen3.5 most on counting shapes; at 64 tokens it also fell for the typographic attack (“dog” for the cat with a DOG sticker); the clock, the sum of the bars and the astronaut’s missing horse fail at every budget (SmolVLM fails the clock and the sum too). Every answer is in out/qa_scored.json.

Tokens grow with pixels only under native resolution

Square images of every size through the real processors measured: SmolVLM (default N = 4) rescales every image to 2,048 first, so its count does not move; Qwen3.5 (default limits) grows with the pixel count up to its 16,384-token cap; InternVL3-1B (256 tokens per 448 tile plus a thumbnail) steps with the tile grid; LLaVA-1.5 is 576 always.

2a. Positions: an image uses its side length, not its token count

A language model with RoPE gives each token one integer position. SmolVLM’s does exactly that for image tokens (positions k, k+1, ...), so the token below a given one is 8 positions away inside a tile, and rows and columns survive only through the <row_r_col_c> text tags the processor inserts. M-RoPE (the rotary mechanism is on Positional Encodings) splits the rotary dimensions into time, row and column groups: text tokens get the same value in all three (ordinary RoPE), image tokens keep the time fixed and get their row and column, and the next text starts at the largest image position plus one.

Predict, then reveal. With 3-D positions, an image of 4,096 tokens (64 × 64) advances the position counter by about how much?

The same 256 image tokens, two position schemes

Qwen3.5 reads the 512 × 512 cat as 16 × 16 tokens starting at position 4, measured with the model’s own get_rope_index measured: (t, h, w) runs from (4, 4, 4) to (4, 19, 19) and the next text token gets (20, 20, 20); the whole 277-token prompt ends at position 36, where 1-D positions would end at 276.

The M-RoPE quotes, Qwen3-VL’s interleaving, and how to check positions yourself (provenance)

Qwen2-VL: “For text inputs, these components utilize identical position IDs, making M-RoPE functionally equivalent to 1D-RoPE”; for an image “the temporal IDs of each visual token remain constant, while distinct IDs are assigned to the height and width components”; the next modality starts at “the maximum position ID of the preceding modality” plus one (section 2.1) paper. Qwen3-VL keeps the three groups but interleaves them across the frequency bands, because “chunking the embedding dimensions into temporal (t), horizontal (h), and vertical (w) groups induces an imbalanced frequency spectrum” (Qwen3-VL Technical Report, section 1) paper; Qwen3.5-0.8B’s config says "mrope_interleaved": true, "mrope_section": [11, 11, 10].

To check: open the What the model saw tab and click any token of any image to read its position, 1-D for SmolVLM and (t, h, w) for Qwen3.5, as the models’ own code computes them (get_rope_index in models/qwen3_5/modeling_qwen3_5.py, line 1364).

3. Reading text in images: legibility is pixels per character after the processor

Reading text (OCR, optical character recognition) is where the resolution budget shows first. A character must cover enough pixels, after every resize the processor does, for 14 or 16-pixel patches to tell an 8 from a B; after merging, several characters share one token. A model can describe a photo well from 64 tokens and still be unable to read a receipt.

The test measured: 21 synthetic 1,024 × 1,024 pages, each with one random 6-character code (no 0/O or 1/I, no words, so the language model cannot guess) at 7 font sizes, from 5 to 32 pixels tall for capitals, each read at three token budgets per model; “What is the 6-character code written in the image? Answer with the code only.” Scored by exact match and character error rate (CER: edits needed to turn the answer into the code, over 6).

Fig. 4: one 20-pixel code (14-pixel capitals) at the scale each setting gives the page

  1. Qwen3.5 at 1,024 tokens: the page at its own size. Capitals are 14 pixels tall, a little under one 16-pixel patch (a grid cell); one token covers 2 × 2 patches, 32 × 32 pixels. It read this code, and all 3 codes at this size.
  2. Qwen3.5 at 256 tokens: the page halved to 512. Capitals 7 pixels, under half a patch; still 3 of 3 read exactly.
  3. Qwen3.5 at 64 tokens: the page quartered to 256. Capitals 3.5 pixels, and one token now covers 128 × 128 pixels of the original page derived. 0 of 3; for PRZ6C7 it answered “PREDCT”.
  4. SmolVLM at 64 tokens: one 512 view. The same 7-pixel capitals as Qwen3.5 at 256, but each SmolVLM token merges 4 × 4 patches (64 × 64 pixels of the shrunk page): 0 of 3 exact, answers one or two characters off (“PR28C7.”).
  5. SmolVLM at 1,088 tokens: enlarged to 2,048 and cut into 16 tiles. Capitals 28 pixels, nearly two patches; 1 of 3 exact. Enlarging adds no detail: once the characters clear the patch, what is left is the model.

The crop is the page’s 256 × 128 pixels around the code at 1:1, resampled in the browser at each setting’s scale (the scale is exact; the interpolation only approximates the processor’s). Answers and counts measured.

Why the budgets behave this way. At SmolVLM’s 64-token setting the page is shrunk to 512, so a 9-pixel capital becomes 4.5 pixels, under a third of a 16-pixel patch, and each token covers 64 × 64 pixels of the shrunk page derived: 16-pixel patches × 4 × 4 merge. At its default setting the page is enlarged to 2,048 and cut into 16 tiles. Qwen3.5 at 1,024 tokens sees the page at its own size, one token per 32 × 32 pixels. Equal token budgets can give different legibility: tiles enlarge, native resolution does not. So SmolVLM at 64 tokens still reads 20-pixel text almost as well as at 1,088 (mean CER 0.22 against 0.11), because its single view keeps 512 pixels where Qwen3.5’s 64-token budget keeps 256; and Qwen3.5 at 64 tokens reads nothing below 28 px, answering “000000”, “666666” or invented strings of the right length.

Codes read exactly, at every size and budget

The crops show each font size at 1:1.

Codes read exactly, of 21: SmolVLM 5 at 64, 7 at 320, 8 at 1,088 tokens; Qwen3.5 3 at 64, 9 at 256, 12 at 1,024 tokens. Greedy decoding, 3 codes per cell, so each cell is a probe, not a rate.

Smallest legible font, an inversion at 1,024 tokens, and the vendor’s OCR numbers (detail)

Smallest font from which at least 2 of 3 codes are read exactly at every larger size: SmolVLM 28 px (19 px capitals) at 1,088 tokens; Qwen3.5 20 px (14 px capitals) at 256 and none at 1,024, because Qwen3.5 at 1,024 tokens fails the largest text (0 of 3 at 40 px, answering “600000”) while reading it at 64 and 256: a 152-pixel-wide code on a 1,024-pixel page at full resolution is a case its training apparently covered less. More tokens are not monotonically better measured.

Model cards lead with OCR benchmarks because documents, charts, screenshots and GUIs are where VLMs are bought: Qwen3.5-0.8B’s card gives OCRBench 74.5 / 79.1 (thinking / non-thinking) and OmniDocBench1.5 61.0 / 70.6 (Qwen3.5-0.8B card, read 2026-10-17) vendor. What those benchmarks measure is on Long-context and multimodal benchmarks; turning PDFs into text for retrieval, where a VLM is one option among layout parsers and OCR engines, is on Document ingestion and multimodal retrieval.

How to check it on your documents. Render a page at the resolution your users send, count tokens with the processor, and test the smallest text that matters at two or three budgets; a code with no words and no prior separates seeing from guessing.

4. Pointing: grounding and the coordinate convention

Grounding ties words to places: “where is the red circle?” answered with a bounding box (left, top, right, bottom). A language model answers in text, so boxes are numbers in text, and the model and the code that draws the box must agree on what the numbers mean. Qwen’s own models changed that meaning twice:

ModelBox coordinates in the textSource
Qwen2-VL“normalized within [0, 1000)”, written “(Xtop left, Ytop left),(Xbottom right, Ybottom right)” between box tokenssection 2.2.1 paper
Qwen2.5-VL“Unlike traditional approaches that normalize coordinates, our model directly uses the actual dimensions of the input image”: pixels of the image as resized by the processorsection 2.1.2 paper
Qwen3-VL“Different from Qwen2.5-VL, we adopt a normalized coordinate system scaled to the range [0,1000]”section 3.2.4 paper
Qwen3.5-0.8Bnot stated in the card; measured below: pixelsthis page

The test measured: 12 synthetic scenes in four shapes (640 × 480, 480 × 640, 800 × 400, 512 × 512), each with two of a red circle, a blue square and a green triangle, exact boxes known; prompt Locate the <shape> in the image. Report its bounding box as JSON: {"bbox_2d": [x1, y1, x2, y2]}. The same raw answers are scored under three readings of the numbers: 0 to 1,000 of the image, pixels of the resized image the encoder saw, and pixels of the original. IoU (intersection over union) is the overlap of predicted and true box over their union: 1 is perfect, above 0.5 the usual “correct”.

Fig. 5: the same four numbers, read three ways

  1. The question. Scene 3 of the 12, 800 × 400 pixels, which Qwen3.5’s processor resizes to 800 × 384; the true box of the red circle is dashed green.
  2. The answer is text. Qwen3.5 writes four numbers, [316, 300, 368, 360], in its JSON answer; nothing in them says what they are measured in.
  3. Read as 0 to 1,000 of the image (Qwen2-VL’s and Qwen3-VL’s convention): the box shrinks towards the top-left corner and misses the circle, IoU 0.00.
  4. Read as pixels of the original 800 × 400: close, but the box sits too high, IoU 0.54.
  5. Read as pixels of the resized 800 × 384 image, mapped back (Qwen2.5-VL’s convention): IoU 0.78, the best of the three.
  6. SmolVLM. It writes [0.0, 0.0, 1.0, 1.0], a dot at the origin under every reading: IoU 0.

Qwen3.5 writes boxes in pixels, not on Qwen3-VL’s 0 to 1,000 scale measured: mean IoU over the 24 boxes is 0.49 read as resized-image pixels, 0.49 as original pixels and 0.06 as 0 to 1,000; 11 of 24 boxes reach IoU 0.5 under the best reading. The two pixel readings differ only on the 800 × 400 scenes (the processor makes them 800 × 384), and there the resized reading fits better: the Qwen2.5-VL convention. The misses are mostly a right edge or bottom far too large (a blue square of 143 pixels reported 650 wide). SmolVLM writes boxes that mean nothing: all 24 answers are tiny boxes at the origin such as {"bbox_2d": [0, 0, 2, 2]}, IoU 0 under every reading; its training data did not teach it boxes.

All 12 scenes and 24 boxes, under each reading (the full test)

How to check it. Draw a model’s boxes on two or three images of different aspect ratios under each documented convention: the right one lines up on all of them, and a wrong one fails worst on non-square images. When the processor resized the image, keep its output size (image_grid_thw × patch size) next to the answer.

5. Video: frames become tokens, time becomes text

A minute of video at 30 frames per second is 1,800 images; even at 256 tokens each that is 460,800 tokens derived. Video VLMs sample a few frames per second, merge pairs of frames into one token, and cap the total. Qwen2-VL samples “two frames per second”; its patch embedding is a 3-D convolution of depth 2 over consecutive frames (“3D tubes instead of 2D patches”; a still image is “treated as two identical frames”), and training capped “the total number of tokens per video to 16384” (section 2.1) paper. Time positions moved from frame counting (Qwen2-VL) to absolute time inside M-RoPE (Qwen2.5-VL) to plain text: Qwen3-VL prefixes each temporal patch with “a timestamp expressed as a formatted text string”, such as “<3.0 seconds>” (Qwen3-VL report, section 2.3) paper.

Qwen3.5’s processor does the same. The real prompt for one 4-second clip sampled at 2 frames per second, timestamps <0.2 seconds> to <3.5 seconds>, each run of 80 video tokens written “x80” measured:


Token arithmetic derived: tokens per second = (frames sampled per second / 2) × (height / 32) × (width / 32), plus a few timestamp tokens per pair of frames. A 320 × 240 clip at 2 frames per second costs 80 tokens per second; a 1,280 × 720 clip costs 720, because the processor caps each frame at 768 tokens and shrinks the frames to 1,152 × 640 measured with the processor. The Token budget tab computes any case.

The test measured: 8 synthetic clips (16 frames, 4 seconds) of a red or blue dot crossing the frame in one of four directions, asked which way it moves; as a control, the same question about the first frame alone.

Fig. 6: one 4-second clip becomes 320 video tokens with its times written as text

  1. 16 frames, 4 seconds. One clip as it was made: a red dot crossing a 320 × 240 frame from left to right, 4 frames per second.
  2. Sampled at 2 per second. The processor keeps 8 of the 16 frames: 0, 2, 4, 6, 9, 11, 13 and 15 (inferred from the four timestamps it writes, which are the means of these pairs) derived.
  3. Pairs become tubes. Each pair of kept frames is one 3-D patch of depth 2; the frames are resized to 320 × 256, so each tube is 16 × 20 patches of 16 pixels (video_grid_thw [4, 16, 20]).
  4. 80 tokens per tube. The 2 × 2 merger turns each tube into 80 tokens: 4 × 80 = 320 video tokens, 400 prompt tokens in all.
  5. Time is text. Before each tube the processor writes its time as ordinary text tokens, <0.2 seconds> to <3.5 seconds>: the model reads when each tube happened instead of counting frames.
  6. The answer. Asked which way the dot moves, Qwen3.5 said “right to left”; shown only the first frame, it said “left to right”.

Qwen3.5 got the direction right in 0 of 8 clips; in 7 it named exactly the opposite direction. Each clip is 320 video tokens (4 temporal patches of 80), 400 prompt tokens in all. The one-frame control got 4 of 8, all horizontal: with the dot near one edge, “it moves away from that edge” is a good guess. The processor keeps the frames in order (decoding the dot from pixel_values_videos, it moves from x = 40 to 248 in the left-to-right clip), so the reversal is the model’s. A 0.8B model on synthetic dots is a narrow probe (the vendor reports VideoMME 63.8, thinking, with subtitles vendor), but direction of motion is what a video model must not get backwards, and checking it costs 16 frames.

6. Training: align the connector, then train everything

A VLM joins two pretrained parts that have never met through a randomly initialised connector. Training everything at once lets the random connector send noise into a good language model; training too little leaves the image tokens unreadable. Every recipe answers which parts train in which stage, on what data, and for how long:

The pattern. A short alignment stage with only the connector training survives everywhere (LLaVA’s stage 1, Qwen3-VL’s S0); after it, recent recipes train everything, the encoder included, on a trillion tokens or more, with text-only data mixed in so the language model does not forget. Image-caption pairs teach what is in an image; interleaved web pages teach several images in context; OCR, chart, document and grounding data teach reading and pointing; instruction and conversation data teach answering. The loss is on text tokens only: the model never predicts image tokens (that is Native multimodal and any-to-any models).

Freeze or train the encoder? Freezing saves memory (no optimiser state for it) and protects features learned from billions of pairs; training lets the encoder learn what the language model needs (small text, positions, the processor’s tiles). Idefics2 found that adapting the backbones with LoRA beat freezing them by 9.2 points in its own table (section 1), and the recipes that train the encoder do so after an alignment stage, usually at a lower learning rate. The weights show it happened in SmolVLM: its encoder moved 0.23 to 0.37 of its norm away from the public SigLIP checkpoint it started from (below).

After a short connector-only stage, recent recipes train the encoder too

One row per published recipe, one column per stage; E encoder, C connector, L language model paper. “Not stated” means the paper’s text does not say for that part; BLIP-2’s first stage has no language model at all; Qwen3-VL’s S2 and S3 then extend the context to 32,768 and 262,144 tokens; SmolVLM’s two stages (“(1) a vision stage, and (2) a video stage”) are left out because the passages read do not say what is frozen.

Each recipe’s stages, data and compute in the papers’ words (reference table)
ModelStages and what trainsData and compute stated
LLaVA-1.5 (2023)1: projector only; 2: projector and language model; encoder frozen throughout558K captions, 665K instructions, “~1 day on a single 8-A100 node” (paper)
BLIP-2 (2023)1: Q-Former against the frozen encoder with three losses (contrastive, matching, captioning); 2: Q-Former and projection against the frozen language model; both backbones never train129M images; largest model “less than 6 days for the first stage and less than 3 days for the second stage” on “a single 16-A100(40G) machine” (section 3.4)
Qwen2-VL (2024)1: “exclusively on training the Vision Transformer”; 2: “unfreeze all parameters”; 3: “lock the ViT parameters” and instruction-tune the language modelabout 600B tokens then 800B more of image-related data, “a cumulative total of 1.4 trillion tokens”, loss on text tokens only (section 2.2)
InternVL 1.5 (2024)1: encoder (6B) and MLP projector; 2: “the entire model’s 26 billion parameters”public datasets listed in its Table 1 (section 4.1)
Idefics2 (2024)new parameters fully trained, backbones adapted with LoRA (full unfreezing diverged); instruction tuning with DoRAinterleaved web documents (OBELICS) and image-caption pairs, then PDFs at up to 980 pixels (sections 3.2 and 4.1)
Qwen3-VL (2025)S0: “only the parameters of the MLP merger are trained”; S1: “unfreeze all model components”; S2 and S3: longer contexts (32,768, then 262,144)S0 about 67B tokens, S1 about 1T tokens mixing vision-language and text-only data (section 3.1)
SmolVLM (2025)“two stages: (1) a vision stage, and (2) a video stage”; which parts are frozen is not stated in the passages read (root lab)the video stage keeps “14% of text data and 33% of video” (section 4.1, paper)
Was SmolVLM’s encoder trained inside the VLM? The weights say yes (measured)

The SmolVLM paper names its encoder (“SigLIP-B/16”) but the passages read do not say whether it was frozen. Its vision tower has the same shape as Google’s public google/siglip-base-patch16-512 (12 blocks, width 768, 1,024 positions; the public checkpoint adds a pooling head a VLM does not use), so each tensor can be compared directly: the relative change ‖WSmolVLM − WSigLIP‖ / ‖WSigLIP‖, averaged over each block weighted by size measured.

Every tensor changed: the transformer blocks by 0.23 (block 0) to 0.37 (block 11) of their norm, rising with depth, the patch and position embeddings by 0.30, the final LayerNorm by 0.02. Rounding to bfloat16 accounts for well under 0.01, and two unrelated checkpoints of this shape would differ by about 1.4 (the norm of a difference of two independent tensors of equal norm is √2 times the norm). So SmolVLM’s encoder started from this checkpoint (or one very close to it; inferred from the match, not stated in the passages read) and was trained inside the VLM, the deep blocks most; it also lost the public checkpoint’s mild fixed-position outliers (section 1).

7. Hallucination: when the language model answers instead of the image

A VLM writes the most likely text given the image tokens and the words so far. When the visual evidence is weak (a small object, a low budget, a confusing scene) or the question suggests an answer, the language model’s habits win: it names objects that usually appear with what is there, or agrees with the question. This is object hallucination. POPE (Li et al., May 2023) made it a yes/no test, “Is there a <object> in the image?”, over present objects and absent ones drawn at random, from the most frequent objects (popular) or from objects that co-occur with what is there (adversarial), and showed that “LVLMs are prone to hallucinate objects which frequently appear or co-occur in the visual instruction dataset” paper. The older caption metric CHAIR (the share of mentioned objects not in the image) moved with the prompt, up to “doubled values of CHAIR metrics” between two similar instructions, one reason POPE asks short questions.

Measured better than by counting answers measured. The root lab’s 72 yes/no questions on its 16 test images (25 present objects, 16 absent at random, 31 absent but adversarial), scored by P(yes) = probability on yes tokens / (probability on yes + no tokens) at the first answer token, which shows how sure each answer is. Each question is asked four ways: with the image, with a plain grey image, with no image at all (the language model’s prior alone), and with the leading phrasing “There is <object> in the image, isn’t there?”.

What reduces it published, not run here: more image tokens where it matters (LLaVA-NeXT’s blog says higher resolution “reduces the model hallucination that conjectures the imagined visual content when confronted with low-resolution images”); training data with negative and “not visible” answers; preference training against hallucinated captions; shorter answers.

Evaluating a VLM. The failure modes on this page each have a cheap check: a no-word code for reading (section 3), boxes under every convention (section 4), a direction test for video (section 5), P(yes) with blank and no-image baselines for hallucination (above), and matched token budgets for any comparison. Public benchmark scores (MMMU, DocVQA, OCRBench, POPE, video suites) and their pitfalls are on Long-context and multimodal benchmarks; how generative and VLM outputs are judged is on Evaluating generative models.

Both models look: a grey image drives yes to nearly zero, and without any image the prior answers

With the image, SmolVLM says yes (P(yes) ≥ 0.5) to 24 of 25 present objects and 2 of 47 absent ones, Qwen3.5 to 25 and 4; every absent yes is adversarial, an object that goes with the scene (a dog in the typographic-attack image for both; a legend in the chart; numbers and a second hand on the clock; a person at the lighthouse). On a grey image mean P(yes) on present objects is 0.02 and 0.01. With no image SmolVLM keeps about 0.3 on yes whatever the object (0.31 present, 0.33 absent; 13 of 72 yes), Qwen3.5 about 0.15 (0.15 and 0.15; 0 yes). The leading phrasing moved absent objects only slightly: 0.05 to 0.05 (SmolVLM), 0.06 to 0.14 (Qwen3.5). These are 16 easy images, not POPE’s COCO scenes: the method transfers, the rates do not.

Every question, both models, four conditions, with a threshold you can move (the full probe)

Predict first: if you lower the threshold to 0.2, which condition gains the most wrong yeses? Then pick a model and a condition and drag. Green dots are objects that are there (should be high), red absent ones (should be low); highlighted rows are wrong at the current threshold.

8. What image tokens cost, and cutting them without retraining

Image tokens are ordinary tokens to the language model: they take context, every later token attends to them, and their keys and values are cached for the whole conversation; on top of that the encoder runs once per image. The cache per token is the model’s, whatever the token is: SmolVLM-500M keeps 2 × 32 × 5 × 64 × 2 = 40,960 bytes per token (measured slope equal to the config arithmetic), Qwen3.5-0.8B 12,288 bytes in its 6 attention layers plus a fixed state in the other 18, so its cache grows 3.3 times more slowly measured. Sizing a whole model at any context is the KV-cache calculator on Long context, which carries both models and LLaVA-1.5-7B as presets.

The measured cache after prefill, and where the time goes (measured)

Cache tensors summed by walking the cache object after a real prefill (bfloat16 keys and values, float32 recurrent state) measured. Qwen3.5-0.8B is a hybrid: of its 24 layers only 6 are attention layers with a growing cache (“6 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN))”, card vendor); the other 18 are linear-attention layers (Gated DeltaNet, a relative of the state-space models on the Mamba page) that keep a fixed-size state.

SmolVLM’s cache grows by 40,960 bytes per token with nothing fixed (3.4 MB at 82 prompt tokens, 46.8 MB at 1,142). Qwen3.5’s grows by 12,288 bytes per token on top of a fixed 19.8 MB held by the 18 linear-attention layers (20.8 MB at 85 tokens, 32.6 MB at 1,045). The fixed state is worth about 1,608 tokens of its attention cache: at 1,000 tokens SmolVLM holds 41.0 MB and Qwen3.5 32.0 MB; at 8,000 tokens (near SmolVLM’s 8,192 context) 327.7 MB against 118.1 MB. For scale, LLaVA-1.5-7B (32 layers, 32 KV heads of 128) keeps 524,288 bytes per token, so one 576-token image holds 302 MB.

Time measured. SmolVLM at 1,088 image tokens (the root lab’s measurement): encoder and connector 1.61 s, a full forward of the 1,142-token prompt 2.04 s, so about 0.44 s in the language model, decoding 13.9 ms per token. Qwen3.5 at 64, 256, 1,024 image tokens: encoder 0.05, 0.13, 0.64 s; full forward (encoder included) 0.31, 0.86, 3.10 s; decoding 24, 24, 25 ms per token; peak GPU memory 2,365, 2,349, 2,341 MiB. Its linear-attention layers run transformers’ reference PyTorch code here (the optimised kernels, flash-linear-attention and causal-conv1d, are not installed and target CUDA GPUs), so its times say little about a datacenter GPU; the token counts and cache sizes transfer exactly.

8a. Fewer image tokens without retraining measured

If most image tokens carry little, can they be dropped at inference? FastV (Chen et al., March 2024) observed that after layer 2 image tokens get little attention in LLaVA-1.5 (“image tokens take up most of the input tokens (64%)”) and pruned half of them there, ranked by “the average attention-score one token received from all other tokens”, reporting “a 45% reduction in FLOPs for LLaVA-1.5-13B” without loss on its benchmarks paper. Here SmolVLM answers the root’s 30 questions with its 1,088 image tokens cut four ways before the language model: at random; by FastV’s ranking (computed at layer 2, but the tokens are removed from the input rather than after layer 2, a simplification); by averaging each 2 × 2 block (a merge the model never saw); and by dropping the 64-token global view.

Fig. 7: SmolVLM’s 1,088 image tokens for the cat, cut before the language model

  1. All 1,088 tokens. 16 tiles and the global view, 64 tokens each, drawn over the views the processor made. With all of them SmolVLM answers 26 of the root’s 30 questions.
  2. Attention-ranked quarter (FastV’s ranking). Keep the 272 tokens that receive the most attention at layer 2, averaged over all later queries. For “How many cats are in this image?” 150 of them come from the first four tiles and only 6 from the global view. 12 of 30 right.
  3. 2 × 2 average pooling. Each view’s 8 × 8 tokens averaged to 4 × 4: 272 tokens, a merge the model never saw in training. 19 of 30.
  4. Drop only the global view. All 1,024 tile tokens kept, the 64 of the whole-image view removed: 15 of 30, worse than keeping a random half.
  5. Every setting, side by side. Right answers of 30 for all nine settings; random pruning in gold, attention-ranked in purple.

Every cut costs answers, and the 64 global tokens matter more than the 1,024 tile tokens measured. Right answers of 30: all 1,088 tokens 26 (the root lab’s 26, reproduced through this page’s token-editing path); random half 20, quarter 17, eighth 15; attention-ranked half 16, quarter 12, eighth 9; 2 × 2 average pooling (272 tokens) 19; dropping only the global view and keeping all 1,024 tile tokens: 15. Language-model prefill on the cat question fell from 0.43 s to 0.15 s at a quarter of the tokens.

Three lessons. (1) The model was trained to read the global view first and the tiles as detail, so counting and charts fail without it. (2) Pooling the projector’s outputs, a merge the model never saw, loses 7 answers; the same compression trained into the connector (SmolVLM’s pixel shuffle, Idefics2’s resampler) costs little. (3) FastV’s ranking did worse than random: averaged over all later queries, attention favours early tokens simply because more queries can see them, so it kept mostly the first tiles (for “How many cats are in this image?”, 150 of the 272 kept tokens came from the first four of 16 tiles and 6 from the global view). FastV prunes after layer 2 inside a 7B or 13B model; a 500M model with the pruning moved to the input is a harsher test, so read this as “measure before trusting”, not as a refutation.

When it matters. Token count drives prefill time and cache size linearly (and attention quadratically at long lengths), so a VLM serving screenshots or video is usually bound by image tokens. The cheapest lever is the processor setting (fewer tiles, lower maximum pixels), then a model trained with a stronger merge; training-free pruning is a third option whose loss must be measured on your own questions.

9. Serving: what a server caches and shares

A serving engine (see Topic: inference-and-serving and Batching, KV cache and scheduling in depth) handles a VLM request in four costs, and vLLM (documentation, latest, read 2026-10-17) vendor has a lever for each:

  • Content hashing: “vLLM normally hashes each media item by content to enable caching across requests”; a client may pass stable IDs (multi_modal_uuids) to skip re-hashing, or skip sending the image when a cache hit is expected (multimodal inputs). The processor cache defaults to 4 GiB (mm_processor_cache_gb, optimization).
  • The encoder is small next to the language model, so mm_encoder_tp_mode="data" shards the images instead of the encoder’s weights, which “has been shown to improve the throughput and TTFT by around 10% for tensor_parallel_size=8”.
  • Limits and pruning: limit_mm_per_prompt bounds the images or videos per request; --video-pruning-rate drops video tokens that barely change from the previous frame, “at some cost in accuracy”.
  • Prefix caching with images: a second question about the same image reuses the cached keys and values of the shared prefix (system prompt, image, earlier turns) only if the image tokens are identical, which content hashing guarantees; putting the image before the question makes the shared prefix longest. At laptop scale the encoder is a large share of a short answer (section 8), exactly the share a cache hit removes.

Four costs per request, one lever each

Preprocessdecode, resize, tilecached by content hash; processor cache 4 GiB by default
→
Encoderpatches to image tokenswith tensor parallelism, shard the batch of images, not the weights
→
Prefilltext and image tokensprefix cache reuses identical image tokens; limit images per prompt
→
Decodeanswer tokensreads every cached image token per step

A VLM request through vLLM, with the cache or limit at each stage (documentation read 2026-10-17) vendor.

Mistakes that ran here, and two design questions

Real errors and outputs from this page’s runs, each with what to do instead; open the ones that match your work.

Calling the image processor instead of the processor (InternVL)
The InternVL3-1B-hf repository ships "crop_to_patches": false in its image-processor config; the InternVLProcessor overrides it to True (models/internvl/processing_internvl.py line 34, v5.20.1). Call the image processor alone and dynamic tiling silently disappears: a 1,920 × 1,080 screenshot gets 1 view (256 tokens) from the image processor alone and 9 views (2,304 tokens) through the processor; an A4 page at 150 dpi, 1 against 7 measured with the processors. Always build inputs with the model’s processor and count the tokens it produced.
Drawing boxes in the wrong coordinate system
Qwen2-VL and Qwen3-VL write boxes on a 0 to 1,000 scale; Qwen2.5-VL writes pixels of the resized image (section 4). On this page’s 24 boxes, reading Qwen3.5’s numbers as 0 to 1,000 (the convention its Qwen3-VL predecessor documents) gives mean IoU 0.06 instead of 0.49: every box lands in the wrong place and nothing raises an error. Verify the convention by measurement for each checkpoint.
Passing video frames without their frame rate
Qwen3.5’s video processor needs the clip’s frame rate to sample at 2 frames per second. Without metadata transformers warns, verbatim: “Asked to sample `fps` frames per second but no video metadata was provided which is required when sampling with `fps`. Defaulting to `fps=24`.” On this page’s 16-frame, 4-second clip that made the processor treat it as 0.67 seconds: 2 temporal patches (4 frames kept of 16) and a first timestamp of <0.1 seconds>, against 4 patches spread over 0.2 to 3.5 seconds with video_metadata set measured with the processor. Pass the real frame rate and duration.
Writing the prompt by hand
The processor expands one placeholder per image into hundreds of image tokens; without the placeholder there is nowhere to put the image. SmolVLM’s processor refuses, verbatim: “ValueError: The total number of <image> tokens in the prompts should be the same as the number of images passed. Found [0] <image> tokens and [0, 1] images per sample.” Qwen3.5’s processor accepts the same mistake without a word and returns a prompt with no image tokens; the model then fails at the first forward, verbatim: “ValueError: Image features and image tokens do not match, tokens: 0, features: 256” measured. Use apply_chat_template with an image entry, then the processor.
Expecting a training-free token cut to be free
Here random pruning to half the image tokens cost SmolVLM 6 of 30 answers, attention-ranked pruning 10, and dropping the 64-token global view alone 11 (section 8a). Methods that report no loss (FastV) were measured on larger models and on benchmarks; measure on your own questions before shipping a pruning rate.
Scoring yes/no answers by parsing text only
A parsed “yes” hides how close the call was, and a model that answers neither yes nor no gets miscounted. Read the probability on yes and no tokens at the first answer position (section 7): the yes rate on absent objects, its confidence, and the share of probability on neither are all visible.
Comparing models at their default settings and calling it a model comparison
At defaults SmolVLM spends 1,088 tokens on a 512-pixel square and Qwen3.5 spends 256; on a 1,024-pixel page, 1,088 and 1,024; on a 64-pixel icon, 1,088 and 64 (section 2, measured). Compare at matched token budgets as well as at defaults, and say which.
Running a model with a decoding setting it was not tuned for, without saying so
Qwen3.5-0.8B’s card recommends sampling for vision tasks (“temperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5”) vendor; this page decodes greedily, so every answer is reproducible but may differ from the vendor’s setting. Report the decoding with every score.
Design: a VLM that extracts fields and their locations from invoices (interview rehearsal)
Native-resolution or tiled encoder sized so the smallest printed text has several pixels per stroke after resizing (test legibility first, section 3); count tokens per page and cap them; a model trained for grounding, with its coordinate convention verified on non-square pages; training data of documents with boxes, plus negatives (“field absent”) against hallucinated fields; evaluate exact match per field, box IoU, and the absent-field false-positive rate; cache the page encoding so several questions about one invoice reuse it.
Design: question answering over 10-minute videos on one GPU (interview rehearsal)
Sample 1 to 2 frames per second, merge frame pairs and 2 × 2 patches, and cap tokens per video (Qwen2-VL trained with 16,384); add timestamps so answers can cite times. Know what your processor does to long inputs: at 320 × 240 and 2 frames per second a short clip costs 80 tokens per second, but for 10 minutes Qwen3.5’s processor keeps at most 768 frames and shrinks each to 192 × 128, so the whole video becomes 9,216 tokens (measured with the processor), which may be too blurry to answer. Choose fps and resolution per question type, prune near-duplicate frames or tokens (vLLM’s video pruning), cache the encoded video across questions, and measure accuracy against tokens.
Scripts and recorded outputs: src/runs/ and src/out/ in this page’s folder (make_inputs.py, smol_cpu.py, siglip_norms.py, encoder_drift.py, token_rules.py, run_vlm2.py; make_data.py builds the page data). Published quotes and numbers: src/facts.md.