A field guide · Vision-language models

The Cost of a Picture

Efficient vision-language models, from token compression to serving: where the cost of an image goes, and how to cut it without losing the details a task needs.

Vision-language modelsInference efficiencyToken compression

What one picture costs

Ask a vision-language model one short question about one screenshot. The question is twenty words. The screenshot becomes more than a thousand tokens. Where does the cost of that picture go, and how much of it can we remove before the answer gets worse?

Start with numbers that providers publish. Anthropic's documentation says Claude covers an image with 28 × 28 pixel patches and charges one visual token per patch. A 1000 × 1000 image costs 1,296 tokens. OpenAI documents a tile rule for GPT-4o. A detailed image is scaled, cut into 512-pixel tiles, and charged 170 tokens per tile plus 85 base tokens. Google's Gemini documentation charges 258 tokens for a small image and 258 tokens per 768-pixel tile for a larger one. The exact rules differ and change between model versions. The order of magnitude does not. One ordinary picture is worth hundreds to thousands of text tokens.

Open models are no different. LLaVA-1.5 turns a 336-pixel image into 576 tokens. A model with dynamic tiling can turn one document page into several thousand. A minute of video can be tens of thousands. All of those tokens pass through a large language model. They take compute when the prompt is processed, memory for as long as the conversation lives, and bandwidth every time a new word is generated.

This article builds the answer from the ground up. We first take one request apart and write down what each stage costs. Then we look at every place the cost can be cut. The connector decides how many tokens an image becomes. Training-free methods drop or merge tokens later. Small models shrink everything from the start. Efficient encoders stay cheap at high resolution. Lower-precision weights cut memory. The serving system avoids repeated and blocking work. At each step we ask the question that matters most in practice: what does this cut take away, and which tasks notice?

The post builds on earlier ones. Inside a Modern Vision Encoder explains how pixels become visual tokens. The VLM Architecture Gallery catalogues connectors and architectures. On the systems side, The Mechanics of LLM Inference derives prefill, decode and the KV cache, and The Serving Playbook covers batching, paging and disaggregation. We link to them rather than repeat them.

Where the cost goes

A request with an image passes through five stages. Each stage has its own cost, and each grows with a different quantity. Naming them separately is the first step, because most efficiency methods only touch one of them.

  1. Preprocessing. The server decodes the image file, resizes it, and cuts it into tiles. This runs on the CPU. It is easy to forget because it never appears in a GPU profile.
  2. Vision encoding. A vision transformer (ViT) splits each tile into patches and runs a stack of transformer layers over them. This is pure compute. It runs once per image.
  3. The connector. A small module maps encoder outputs into the language model's embedding space. It also decides how many visual tokens the language model will see.
  4. Prefill. The language model processes the whole prompt at once: visual tokens plus text tokens. It writes a key and a value vector for every token in every layer. That store is the KV cache.
  5. Decode. The model generates the answer one token at a time. Every step reads all weights and the whole KV cache, including every visual token.

Counting tokens

Everything downstream depends on one number: how many visual tokens the image becomes. Suppose an image is H × W pixels and the encoder uses square patches of side p. The encoder sees

Npatch = ⌈H / p⌉ · ⌈W / p⌉ patches per image or per tile; with tiling, sum over tiles

Most modern connectors then merge neighbouring patches. If the connector merges an m × m block into one token, the language model sees

V = Npatch / m2

With 14-pixel patches and a 2 × 2 merge, each visual token stands for a 28 × 28 pixel square. That is the rule Qwen2-VL uses, and it matches the patch size in Anthropic's public pricing rule. A 1344 × 1008 photo then becomes 96 × 72 = 6,912 patches and 1,728 visual tokens.

Compute for the encoder and for prefill

A transformer forward pass costs about two floating-point operations per parameter per token for its matrix multiplies. Attention adds a term that grows with the square of the sequence length. For an encoder with Penc parameters, L layers and width d, run over N patches with full attention:

FLOPsenc ≈ 2 · Penc · N + 4 · L · N2 · d the second term is attention scores plus the weighted sum of values; it is why high resolution hurts the encoder

The language model pays the same shape of cost over the full prompt of V visual tokens and T text tokens:

FLOPsprefill ≈ 2 · PLLM · (V + T) + 4 · LLLM · (V + T)2 · dLLM

Prefill is compute-bound on modern accelerators. Its time is roughly FLOPs divided by the achieved throughput. A small model on a few hundred tokens can be launch-bound instead: a companion lab measured Qwen2-VL-2B prefill at about 24 ms on an H100 for 64, 144 and 576 visual tokens alike. The derivation of why lives in Why Fast GPUs Still Wait for Memory. The time until the first answer token, called TTFT, is preprocessing plus encoding plus prefill.

Memory for the KV cache

Every prompt token leaves a key and a value vector in every layer. With L layers, nkv key-value heads of dimension dh, and b bytes per number:

KV bytes = 2 · L · nkv · dh · b · (V + T)

This memory stays allocated until the request ends. During decode, every new token reads all of it. So visual tokens cost memory capacity, and they also cost memory bandwidth at every step of the answer. The Mechanics of LLM Inference derives this formula and shows why grouped-query attention (GQA), which shares key-value heads across query heads, shrinks it.

A worked example

Take a representative open configuration. The encoder is a 600M-parameter ViT with 14-pixel patches, mostly windowed attention, and a 2 × 2 merge. The language model has 7B parameters, 28 layers, and GQA with 4 key-value heads of dimension 128. The image is the 1344 × 1008 photo from above, with a 40-token question. The accelerator is one H100 at 989 TFLOP/s of dense BF16 compute, of which we assume half is achieved.

Estimate from the formulas, not a measurement
patches · visual tokens6,912 · 1,728
encoder compute (linear layers + 4 global layers)≈ 9.3 TFLOP · ≈ 19 ms
prefill compute over 1,768 tokens≈ 26 TFLOP · ≈ 53 ms
KV cache per token (2 · 28 · 4 · 128 · 2 bytes)56 KiB
KV cache for this request≈ 101 MB, of which the image is 98%
same model with full multi-head attention (28 KV heads)≈ 710 MB
one decode step at batch 1 (read 14 GB of weights at 3.35 TB/s)≈ 4.2 ms

Three things stand out. First, the image is almost the whole prompt. The question is 2% of the tokens. Second, the encoder is not free, but prefill is larger. Third, the KV footprint depends as much on the attention layout as on the image. The same image costs seven times more cache memory in a model without GQA.

The last line shows something that surprises people. At batch size one, a 200-token answer takes about 0.85 seconds of decode, far more than the 70 milliseconds of encoding and prefill. So for one user with a long answer, the image is not the bottleneck. The picture changes in three common cases: short answers (classification, extraction, yes or no), many concurrent users (the KV cache limits how many fit), and many images per request. In those cases the visual tokens dominate. Figure 1 follows one request through the stages.

Figure 1One image request, stage by stage

Figure 1. A 1344 × 1008 photo becomes 6,912 patches, then 1,728 visual tokens after a 2 × 2 merge. The encoder runs once. Prefill processes the visual tokens together with a 40-token question. The KV cache they leave behind is read at every decode step. Numbers are estimates from the formulas in the text for a 600M-parameter encoder and a 7B GQA language model on one H100.

The calculator below lets you change each quantity and watch where the cost moves. Try raising resolution with a small language model, then switch the merge factor, then lengthen the answer.

Figure 2Interactive cost calculator for one image request
Figure 2. Estimates from the formulas in this section, not measurements. Assumptions: 14-pixel patches, a 600M-parameter encoder with 32 layers of width 1280, one H100 SXM at 989 TFLOP/s dense BF16 with 50% achieved for compute-bound stages and 3.35 TB/s for decode, BF16 weights and KV cache, batch size one, a 40-token question. Pruning is applied before the language model. Concurrency assumes 80 GB minus weights minus 4 GB of workspace. Preprocessing time is not modelled.

Fewer tokens by design

The cheapest token is the one never created. The connector decides how many tokens an image becomes, and it is chosen at training time. That makes it the most powerful efficiency lever and the least flexible one. This section walks through the main designs. Inside a Modern Vision Encoder and The VLM Architecture Gallery describe their architectures in detail. Here we look only at what each one costs and keeps.

One token per patch

The simplest connector is a small MLP applied to each patch. LLaVA-1.5 uses it. A CLIP ViT-L/14 at 336 pixels gives a 24 × 24 grid, so the language model sees 576 tokens. Nothing is lost, and nothing is saved. LLaVA-1.5 showed this connector is strong and data-efficient. It also set the baseline that most token-reduction papers measure against. When a paper says "we keep 64 of 576 tokens", it usually means this model.

Merging neighbours: pooling and pixel shuffle

Neighbouring patches are often similar. Two cheap ways merge them. Average pooling takes the mean of each block. Gemma 3 pools its 896-pixel encoder output with a 4 × 4 average, which leaves a fixed 256 tokens per image. Pixel shuffle, also called space-to-depth, stacks the features of an m × m block into one longer vector. An MLP then projects that vector to the language model's width. InternVL 1.5 uses a factor of two, so a 448-pixel tile becomes 256 tokens instead of 1,024. Qwen2-VL concatenates each 2 × 2 group and projects it with a two-layer MLP, which is the same idea.

The two differ in what they throw away. Pooling averages, so fine detail inside a block is blurred before the language model sees it. Pixel shuffle keeps every number. It only moves spatial detail into the channel dimension. The projection MLP must then learn to compress it. SmolVLM pushed this further. Its authors found that small models benefit from a more aggressive pixel shuffle factor of four, not the factor of two used by larger models. At that factor a 512-pixel sub-image becomes 64 tokens.

Learned queries: resamplers

A resampler uses a fixed set of learned query vectors. The queries attend to all encoder outputs and return one token each. The output count is set by the number of queries, not by the image size. Flamingo's Perceiver Resampler returns 64 tokens. BLIP-2's Q-Former uses 32 queries. Idefics2 used a perceiver to cut each image from 729 tokens to 64, and listed learned pooling as one of its findings for efficiency. MiniCPM-V uses one cross-attention layer to compress each image slice to 64 or 96 tokens.

Resamplers give a fixed budget. They also lose the grid. Queries have no built-in notion of which part of the image they summarise. That matters for tasks that need position, such as reading order on a page or pointing at an object.

Keeping locality: convolutional abstractors

Honeybee argued that a projector needs two properties. It should allow flexible token counts, and it should preserve local context. Its C-Abstractor uses convolution blocks and adaptive average pooling to do both. MobileVLM's lightweight downsample projector (LDP) uses depthwise convolutions with stride two, cutting 576 tokens to 144. TokenPacker builds a coarse low-resolution query and then injects fine region features into it, reporting 75% to 89% fewer tokens with comparable results. Cambrian-1's Spatial Vision Aggregator is another spatially aware connector that also reduces token count.

Figure 3Four ways a connector turns 64 patches into fewer tokens

Figure 3. An 8 × 8 grid of patch features passes through five connector designs. The one-to-one MLP keeps all 64. Pixel shuffle stacks each 2 × 2 block into one longer vector, so no number is lost. Average pooling blends each block into one mean. A resampler uses four learned queries that look at the whole grid. A strided convolution slides a 3 × 3 window and keeps a coarse grid with local context.

Spending tokens where the pixels are: adaptive resolution

A fixed budget wastes tokens on simple images and starves dense ones. Three ideas let the token count follow the image.

Tiling. The image is cut into tiles that each go through the encoder. LLaVA-UHD splits native-resolution images into variable slices, compresses each, and adds a spatial schema. It reported supporting six times larger images than LLaVA-1.5 with 94% of the inference compute. InternVL 1.5 uses 1 to 40 tiles of 448 pixels, chosen by aspect ratio, which reaches 4K inputs. Gemma 3's Pan & Scan does this only when needed at inference time. Its report shows why: on InfoVQA, the 4B model rose from 44.1 to 57.0 with Pan & Scan, and the 27B model from 59.4 to 76.4.

Native resolution. Qwen2-VL's naive dynamic resolution feeds the image at its own size, so the token count is proportional to area. The serving system can cap it with a minimum and maximum pixel count. SigLIP 2's NaFlex variant gives an encoder that accepts variable resolution while keeping the aspect ratio.

Hierarchical encoders. Convolutional stages downsample as they go. ConvLLaVA uses ConvNeXt and an extra compression stage, reaching 1536 × 1536 inputs with only 576 tokens. Apple's FastViTHD, used in FastVLM, downsamples so strongly that a 1024-pixel image gives 256 tokens. We return to these in the section on efficient encoders.

Pruning and merging after the fact

Retraining a connector is expensive. Could we take a trained model and simply drop tokens at inference time? A large literature says yes, at least for many tasks. These methods share one assumption: many visual tokens are redundant, and we can find them cheaply. They differ in three choices. Where do they act: in the encoder, between the encoder and the language model, or inside the language model? Which signal scores a token: attention, similarity, or the question? And do they drop tokens or merge them?

Pruning inside the language model

FastV started this line. Its authors looked at attention inside LLaVA-1.5 and found that visual tokens receive very little attention in deep layers. The computation spent on them there looked wasted. FastV lets all tokens pass through the first K layers. After layer K, it ranks visual tokens by the average attention they receive and drops the lowest-ranked fraction. The title states the default: half the tokens are dropped after layer two. The paper reports a 45% FLOPs reduction for LLaVA-1.5-13B without a loss across a wide range of tasks.

Follow-up work varied the schedule and the score. PyramidDrop drops a fraction of tokens at the end of each of several stages, so the count shrinks like a pyramid with depth. It is based on the observation that all tokens matter in shallow layers and redundancy grows deeper. It reported 55% fewer inference FLOPs for LLaVA-NeXT and also used the schedule during training. SparseVLM uses the attention from relevant text tokens to score visual tokens, picks a sparsity per layer, and recycles pruned tokens into compact summaries. It reported 54% fewer FLOPs and 37% lower CUDA latency with 97% of the original accuracy. FitPrune fits a pruning recipe to a target budget by minimising the change in attention distributions, using statistics from a small batch.

Pruning before the language model

Pruning inside the language model leaves early layers and the encoder untouched. Pruning at the encoder output avoids that. LLaVA-PruMerge uses the attention between the encoder's class token and the patches, which is sparse. It keeps the outlier tokens and merges the rest into them by key similarity. It reported a 14× average reduction for LLaVA-1.5 with comparable results. VisionZip selects a few dominant tokens by encoder attention and merges the remaining ones into a small set of contextual tokens. It reported 8× faster prefill and noted that it works in multi-turn conversations where text-guided methods struggle. HiRED gives each tile of a high-resolution image a share of the budget according to its class-token attention, and then picks tokens within each tile. VisPruner keeps tokens with strong visual attention and then removes duplicates among the rest. It reported 91% fewer FLOPs and 75% lower latency for LLaVA-1.5-7B.

Figure 4Where pruning acts, drawn as tokens through depth

Figure 4. Each profile plots how many visual tokens are alive at each layer of a 32-layer language model. The shaded area is proportional to the linear-layer prefill compute on visual tokens. FastV keeps all 576 tokens for two layers and then half. PyramidDrop shrinks in stages. Encoder-side pruning, such as VisionZip, starts small, which also shrinks the KV cache in every layer. The encoder bar on the left does not change in any of them.

Merging instead of dropping

Dropping a token loses its information. Merging averages it into a similar token, so some of it survives. Token Merging (ToMe) made this practical for plain ViTs. In each layer it splits tokens into two alternating sets. Every token in the first set finds its most similar token in the second, measured by the similarity of attention keys. The r most similar pairs are averaged. A size counter tracks how many patches each merged token stands for. Attention is then weighted by size, so a merged token counts as much as the patches it replaced. Off the shelf, ToMe doubled the throughput of ViT-L at 512 pixels with a 0.2% to 0.3% accuracy drop. Figure 5 walks through one round.

Figure 5One round of token merging, step by step

Figure 5. Sixteen tokens from one row of an image: sky, tree, road and two tokens of a sign with small text. Tokens alternate between set A and set B. Each A token links to its most similar B token. The four strongest links merge, and merged tokens record their size. A second round merges again. Similar regions such as sky collapse first. The two text tokens look alike to the similarity measure too, which is how fine text can be blurred away.

Diversity instead of importance

Recent work questioned the idea of ranking tokens by importance at all. DART, short for Duplication-Aware Reduction of Tokens, picks a few pivot tokens and keeps the tokens least similar to them. Its authors showed that importance scores often do worse than random selection, and that their method can prune 88.9% of visual tokens with comparable results, a 1.99× total and 2.99× prefill speed-up. DivPrune frames pruning as a max-min diversity problem: keep the subset whose closest pair is as far apart as possible. CDPruner makes diversity conditional on the instruction. It scores token similarity in the context of the question and selects a subset with a determinantal point process, a method for sampling diverse sets.

Compressing the cache instead of the prompt

A final family leaves prefill alone and shrinks the KV cache after it. VL-Cache allocates a cache budget per layer according to attention sparsity and scores tokens in a modality-aware way. It reported that keeping 10% of the KV cache matched full-cache accuracy and sped up decoding by up to 7.08×. LOOK-M compresses the multimodal KV cache with a text-first policy and merges evicted key-value pairs into kept ones, reporting up to 80% less cache memory. These methods target decode bandwidth and concurrency, not TTFT.

What breaks when tokens go

The headline numbers above are averages over benchmarks like MME, POPE, GQA and ScienceQA. Most of their questions are about large objects and the overall scene. A careful look at what pruning removes tells a less comfortable story.

Attention-based selection is biased by position

Two independent studies found the same flaw in FastV-style pruning. In decoder-only language models, tokens that come later in the sequence tend to receive more attention. Visual tokens are laid out in raster order, top row first. So the tokens near the bottom of the image are kept, and the tokens near the top are dropped. The paper Feather the Throttle showed that early-layer pruning removes most tokens towards the top of the image. Strong scores on many benchmarks hid this. On localization tasks, its fix (an ensemble of criteria plus early uniform sampling) gave more than a 5× improvement over the original approach at similar savings. A small companion lab did not reproduce the bottom-heavy bias on Qwen2-VL-2B: with FastV's attention score applied at the input and 64 of 576 tokens kept, attention selection did not beat random selection (number accuracy 0.44 against 0.42). See the code.

The study Token Pruning in Multimodal Large Language Models: Are We Solving the Right Problem? measured the same bias and then compared against two baselines that every method should have reported. On LLaVA-1.5-7B with 75% of tokens removed, random selection kept 95.0% of the original average score and plain pooling kept 96.4%. FastV kept 89.8% and SparseVLM 93.5%. A variant of FastV that forces spatially uniform selection recovered much of the gap. With 88.9% removed, random selection kept 89.1% and FastV 78.2%.

Grounding and reading suffer first

The same study tested referring-expression grounding on RefCOCO with 77.8% of tokens removed. Every method collapsed. FastV kept 18.8% of its baseline score, random selection 23.2%, and SparseVLM 4.8%. Grounding needs the model to say where something is. A pruned grid has holes exactly where the answer may be.

Reading text has the same weakness. A small sign, a footnote or a number in a table cell covers few patches. Those patches do not stand out by attention, and they are not redundant with their neighbours. VisionThink's authors made the point directly. Most general visual questions were answered correctly at a quarter of the resolution, but a small subset of OCR-related tasks dropped significantly. The inference-optimal scaling study that we discuss in the next section found the same reversal for document and text-reading tasks.

Figure 6Pruning policy explorer: which tokens survive, and which questions still work
Figure 6. An illustrative toy, not a measured model. The scene has 108 visual tokens. The attention policy uses a synthetic score that favours large objects and later (lower) rows, imitating the position bias described in the text. Uniform keeps an evenly spaced grid. Diversity keeps tokens that differ most from those already kept, so it keeps the sign but treats the two look-alike birds as duplicates, which breaks counting. Question-guided boosts tokens related to the question, which helps that question but makes the kept set depend on it. A question counts as answerable when enough of the tokens it needs survive: three of the four sign-text tokens, one car token, both bird tokens.

Pruning interacts with the rest of the system

Three more problems show up only when pruning meets a real deployment.

Multi-turn conversations. A pruning rule guided by the first question keeps the tokens that question needed. The second question may need different ones, and they are gone. VisionZip's authors noted that previous methods underperform in multi-turn settings for this reason. Question-guided pruning also makes the cached visual state depend on the question, so it cannot be reused for the next one.

Models that already compress. Most early results were on LLaVA-1.5, which keeps all 576 patches and is unusually redundant. Qwen2-VL already merges four patches into one token during training. The pruning study found that FastV results on Qwen2-VL-7B look much worse when that built-in compression is ignored and nearly lossless when it is counted. A 50% cut means different things for different models.

Batching. A per-image keep ratio based on content produces different token counts per request. That is fine for one request. In a batch, ragged lengths waste padding or require variable-length kernels.

How many tokens a task needs

The last two sections asked how to remove tokens. A better question is how many a task needs in the first place. The answer turns out to vary by orders of magnitude.

Nested budgets

Matryoshka Multimodal Models (M3) train one model to work with nested sets of visual tokens, from coarse to fine. The same model can then be run at any of several budgets. Its authors found that COCO-style benchmarks need only about 9 visual tokens to match the accuracy of all 576. The Matryoshka Query Transformer does the same with a resampler: it trains with a random number of the first m queries. It matched LLaVA-1.5 with at most 256 tokens. At 16 tokens it lost 2.4 points on MMBench. On ScienceQA and MMMU it lost only 3% and 6% with just 2 tokens.

An inference-optimal trade-off

Suppose you have a fixed inference budget. You can spend it on a bigger language model or on more visual tokens. Which is better? Li and colleagues fitted a scaling law to answer this. They trained models with Qwen-1.5 language models from 0.5B to 14B parameters and visual token counts from 1 to 576. They fitted the error as

Y(N, T) = A / Nα · B / Tβ + D N: language-model parameters · T: inference tokens · α, β, A, B, D: fitted constants

For visual reasoning tasks the fit gave α = 0.077 and β = 0.015. Error falls five times faster in log terms with model size than with tokens. So the compute-optimal choice is the largest model that fits the budget, with very few visual tokens. With the text cached, the optimum went down to a single token. With a 50-token question in the prompt, it rose to about 16. For text-reading tasks such as DocVQA and TextVQA the exponents reversed: α = 0.029 and β = 0.048. Visual tokens mattered more than parameters, and heavy compression hurt.

Figure 7Tokens versus accuracy for scene questions and for reading text (illustrative)
Figure 7. Shapes, not data. The curves are drawn to match the qualitative findings cited in this section: scene benchmarks saturate with few tokens (M3, the inference-optimal study), while text-reading accuracy keeps rising with tokens (the same study, VisionThink, Gemma 3's Pan & Scan results). The prefill readout uses the formula from Figure 2. Use it to build intuition, not to pick a number.

Letting the model decide

If the right budget depends on the request, someone has to choose it. Three recent lines move the choice into the model.

Ask for more pixels. VisionThink starts from a downsampled image. If the model judges the image insufficient, it emits a special token that requests the full-resolution version. It is trained with reinforcement learning, using an LLM-as-judge reward and a penalty that keeps the request rate reasonable. This connects efficiency to the active-perception ideas in Thinking With Images.

Route each region. InternVL3.5 adds a Visual Resolution Router. For each image patch it chooses between two compression rates, giving 256 or 64 tokens. The router is trained after a consistency stage that teaches the model to give the same answer under both rates. The report says the Flash variant uses 50% fewer visual tokens while keeping nearly 100% of performance.

Fuse early, then compress hard. LLaVA-Mini observed that visual tokens matter mainly in the early layers, where their information flows into the text tokens. It adds a small pre-fusion module that does this mixing before the language model, and then feeds the language model a single visual token. It reported beating LLaVA-1.5 on its benchmark set while cutting FLOPs by 77%. VoCo-LLaMA trains the language model itself to compress visual tokens into a few special tokens through attention distillation. LLaMA-VID represents each video frame with two tokens, one conditioned on the question and one for content.

Text as an image: optical compression

DeepSeek-OCR turned the question around. If a page of text can be rendered as an image, how few visual tokens can carry it? Its encoder produces 64 tokens for a 512-pixel page and 100 for a 640-pixel page. On the Fox benchmark, with fewer than ten text tokens per vision token, decoding precision was about 97%. At around twenty text tokens per vision token it fell to about 60%. Glyph applies the idea to long-context language tasks. It renders long text as images and reported 3 to 4× token compression with accuracy comparable to strong language models, plus faster prefill and decoding.

Comparing token-reduction methods

The table below lines up the methods from the last four sections along the aspects that decide whether a method fits a deployment. Where a paper reports a single summary number, it is quoted as reported. These numbers come from different base models and benchmarks and are not directly comparable.

Table 1 · Token-reduction methods compared along the aspects introduced above
MethodActs whereTrainingSignal or mechanismQuestion-awareWorks with fused attentionReported effect (as stated by authors)Main risk
Pixel shuffle / 2 × 2 merge (InternVL, Qwen2-VL, SmolVLM)connectortrained instack neighbours into channels, MLPnoyes4× (factor 2) or 16× (factor 4) fewer tokensfixed ratio for every image
Average pooling (Gemma 3)connectortrained inmean of each blocknoyesfixed 256 tokens per 896-px cropblurs detail inside a block
Resampler (Perceiver, Q-Former, MiniCPM-V)connectortrained inlearned queries cross-attendno (Q-Former can be)yes32 to 96 tokens per image or sliceloses the grid and position
C-Abstractor, LDP, TokenPackerconnectortrained inconvolution or region-to-point injectionnoyesLDP 576 → 144; TokenPacker 75–89% fewerfixed ratio
M3, MQTconnectortrained innested coarse-to-fine budgetsnoyesCOCO-style tasks need about 9 of 576 (M3)someone must pick the budget
ToMeencodernone or fine-tunebipartite matching on key similaritynoyes2× ViT-L throughput, 0.2–0.3% dropmerges look-alike text strokes
LLaVA-PruMergeencoder outputnoneclass-token attention outliers, mergenoyes14× fewer on LLaVA-1.5needs a class token
VisionZipencoder outputnone (optional tuning)dominant plus merged contextual tokensnoyes8× faster prefillbudget fixed per image
HiREDencoder outputnoneper-tile budget from class-token attentionnoyes4.7× generation throughput at 20% budget (P40)tile budget can miss small text
FastVinside LLM, after layer 2noneattention receivedpartlyno45% fewer FLOPs, LLaVA-1.5-13Bposition bias, grounding collapse
PyramidDropinside LLM, stagednone or trainedattention from last instruction tokenyespartly55% fewer inference FLOPs, LLaVA-NeXTstage ratios need tuning
SparseVLMinside LLM, per layernonetext-to-visual attention, recyclingyesno54% fewer FLOPs, 37% lower latencylatency gain smaller than FLOPs gain
VisPruner, DART, DivPruneencoder output or early LLMnonediversity or duplicationnoyesDART: 88.9% pruned, 2.99× prefillmay drop a unique but needed token
CDPrunerbefore LLMnoneinstruction-conditioned diversity (DPP)yesyes95% fewer FLOPs, 94% accuracy kept (LLaVA)kept set depends on the question
VL-Cache, LOOK-MKV cachenonemodality-aware eviction and mergingyesyesVL-Cache: 10% of cache, up to 7.08× faster decodeno TTFT gain
LLaVA-Mini, VoCo-LLaMAconnector plus LLMtrainedpre-fusion or learned compression tokensLLaVA-Mini yesyes1 vision token (LLaVA-Mini)requires a new model
VisionThinkinput resolutionRLmodel requests full resolutionyesyesquarter resolution unless neededextra round trip when it asks
InternVL3.5 ViRconnectortrainedrouter picks 256 or 64 tokens per patchnoyes50% fewer tokens, nearly 100% performancerouter errors on dense patches
DeepSeek-OCR DeepEncoderencodertrainedwindow attention, 16× conv compression, then global attentionnoyesabout 97% OCR precision below 10× compressionfalls to about 60% near 20×

How to read this table. Read the "Acts where" column first. It tells you which cost a method can reduce: encoder-side methods save encoder time, prefill and KV; inside-LLM methods save part of prefill; cache methods save decode only. Then read "Works with fused attention" and "Question-aware" together. The pattern to notice is that the newer training-free methods moved away from attention scores towards similarity and diversity, which are cheaper, kernel-friendly and less biased by position.

Small vision-language models

Token reduction keeps the model and shrinks its input. The other route keeps the input and shrinks the model. Small VLMs, roughly under 4B parameters, target phones, laptops, browsers and cheap servers. Building one is not just scaling everything down. The balance between parts changes.

The encoder becomes a large share

A common vision encoder, SigLIP So400m, has about 400M parameters. Next to a 7B language model it is 5% of the weights. Next to a 0.5B language model it is about 45%. Its compute share at high resolution is larger still, because its attention grows with the square of the patch count while the language model sees a merged, smaller sequence. FastVLM's authors studied exactly this trade-off. They found that pairing high resolution with a small language model is suboptimal: the small model cannot use that many tokens, and TTFT becomes dominated by vision encoding. Their answer was a smaller and faster encoder, FastViTHD, with 125M parameters, which emits 16 tokens at 256 pixels and 256 tokens at 1024 pixels.

Figure 8Parameter split of small and mid-size VLMs, and where first-token compute goes

Figure 8. Parameter counts are from the papers (encoder in blue, language model in orange; connectors omitted). The compute view is an estimate from the formulas in the cost section for one 1024 × 1024 image: a So400m-class encoder (about 400M parameters, 27 layers, width 1152, full attention) and a 2 × 2 merge, in front of a 0.5B or a 7B language model. It shows why the encoder dominates time to first token once the language model is small.

What the small-model papers found

SmolVLM is the most systematic study. Its smallest model has 256M parameters: a 93M SigLIP-B/16 encoder and a 135M SmolLM2 language model. Its authors report several findings that differ from large models. Small language models are better paired with a small encoder. More aggressive pixel shuffle helps them. Learned position tokens for image splits work better than writing positions as text. Reusing text-only instruction data from the language model hurt the small models. The 256M model uses under 1 GB of GPU memory for one image. The 2.2B model scored 72.9 on OCRBench and 80.0 on DocVQA in their evaluation.

MobileVLM trained MobileLLaMA language models of 1.4B and 2.7B from scratch and used the LDP connector to cut tokens by 75%. It reported 21.5 tokens per second on a Snapdragon 888 CPU and 65.3 on a Jetson Orin GPU. MobileVLM V2 improved the training scheme and data, with its 1.7B model matching 3B-scale models.

MiniCPM-V targets phones. MiniCPM-Llama3-V 2.5 uses a SigLIP 400M encoder, an 8B language model, image slicing up to about 1.8 million pixels, and 96 tokens per slice. The paper documents the deployment path in detail. 4-bit quantization cut memory from about 16 GB to about 5 GB. Compiler and configuration work raised decoding from 1.3 to 8.2 tokens per second on a Xiaomi 14 Pro. Running the encoder on the phone's NPU cut image encoding from 3.7 s to 1.3 s.

Florence-2 takes a different route. It is a sequence-to-sequence model of 0.23B or 0.77B parameters trained on FLD-5B, 5.4 billion annotations on 126 million images. It is prompted with task tokens for captioning, detection, grounding and segmentation. It is not a chat model. For fixed vision tasks, a small specialist like this can replace a general VLM at a fraction of the cost.

Moondream is an open project with 2B and 0.5B models, the smaller one described as a distillation target for edge devices. It has no paper, so its architecture and data are not reported in a primary source.

BlueLM-V-3B co-designs the model and the phone runtime. It pairs a 400M encoder with a 2.7B language model, redesigns dynamic resolution to avoid wasting tokens, and reported 24.4 tokens per second with 4-bit weights on a MediaTek Dimensity 9300.

PaliGemma and PaliGemma 2 pair SigLIP So400m with Gemma language models from 2B to 27B and train at 224, 448 and 896 pixels. That family is useful for a different reason: it lets one study how resolution and model size interact for transfer tasks. TinyLLaVA showed that with better data and recipes, a 3.1B model can beat 7B models such as LLaVA-1.5.

Large families now ship small members too: Qwen2.5-VL-3B, the InternVL 1B and 2B models, and Gemma 3 4B. Their details live in How the Open VLM Families Were Built.

Table 2 · Small VLMs along the model survey checklist
ModelSize and splitVision encoderLanguage modelResolution handlingToken compressionTraining notesDeployment target and reported speedNotable capability evidence
SmolVLM-256M / 2.2B (2025)93M + 135M · ~400M + 1.7BSigLIP-B/16 · SigLIP So400mSmolLM2split into sub-images plus a downsized global imagepixel shuffle factor 4small text share; no reuse of LLM SFT text; little CoT data256M under 1 GB GPU memory; browser via WebGPU2.2B: OCRBench 72.9, DocVQA 80.0 (authors)
MobileVLM / V2 (2023–24)1.4B and 2.7B LMs (V1); 1.7B and 3B models (V2)CLIP ViT-L/14 at 336 pxMobileLLaMA, trained from scratchfixed 336 pxLDP: 576 → 144V2: improved training scheme and data curation21.5 tok/s Snapdragon 888 CPU; 65.3 tok/s Jetson OrinV2 1.7B on par with 3B-scale models
MiniCPM-Llama3-V 2.5 (2024)~400M + 8BSigLIP SoViT-400m/14Llama3-Instruct 8BLLaVA-UHD-style slicing, up to ~1.8M pixelscross-attention resampler, 96 tokens per slicethree pre-training stages, SFT, RLAIF-V preference stagephone: 4-bit to ~5 GB; 8.2 tok/s decode; NPU encoder 1.3 smultilingual, 30+ languages
BlueLM-V-3B (2024)400M + 2.7B400M ViT2.7B BlueLMredesigned dynamic resolutionnot reported herealgorithm and system co-design24.4 tok/s, 4-bit, Dimensity 9300OpenCompass 66.1 among ≤4B models (authors)
FastVLM (2024–25)125M + 0.5B to 7BFastViTHD (hybrid conv-transformer)Qwen2 0.5B, 1.5B, 7Bsingle static resolution preferred over tilingarchitectural: 16 to 256 tokens from 256 to 1024 pxMobileCLIP-style encoder pretraining; staged VLM training on one 8×H100 nodeM1 Max laptop; 85× faster TTFT than LLaVA-OneVision at 1152 px (0.5B LLM)TextVQA 59.3 vs 55.5 for VisionZip at 64 tokens
Florence-2 (2023)0.23B or 0.77B totalDaViTtransformer encoder-decoderfixed inputnot applicable (seq2seq)FLD-5B: 5.4B annotations, 126M images, data enginespecialist; not a chat modelcaptioning, detection, grounding, segmentation
Moondream 2B / 0.5B2B · 0.5Bnot reported in a papernot reported in a papernot reportednot reported0.5B described as a distillation targetedge devicesnot reported in a paper
PaliGemma 2 (2024)~400M + 2B to 27BSigLIP So400mGemma 2224, 448, 896 px stagesnone (256 to 4,096 tokens)multi-stage pre-training for transferfine-tune per taskOCR-like tasks: tables, molecules, music scores
TinyLLaVA-3.1B (2024)3.1B totalstudied several (framework)small LMs, e.g. Phi-2fixedMLPablates encoders, connectors, data, recipesnot reportedbeats LLaVA-1.5-7B and Qwen-VL overall (authors)

How to read this table. Compare the "Size and split" column with "Token compression". The models that were designed for devices from the start (SmolVLM, MobileVLM, FastVLM, MiniCPM-V) all compress aggressively and keep the encoder small relative to the language model, or make it cheaper. Speed numbers come from different hardware and settings, so read them as evidence that a target was met, not as a ranking.

Efficient vision encoders

The encoder cost formula has a quadratic term: 4 · L · N2 · d. Doubling the side of an image quadruples N and multiplies attention cost by sixteen. Three designs attack that term.

Window attention. Restrict each patch to attend within a local window, and keep only a few layers global. Qwen2.5-VL's encoder uses full attention in just four layers. The rest attend within windows of at most 112 × 112 pixels, so the cost grows roughly linearly with image area. DeepSeek-OCR's encoder runs a window-attention stage first, compresses 16× with two strided convolutions, and only then applies global attention to the much shorter sequence. A 1024 × 1024 page becomes 4,096 patches and then 256 tokens before global attention sees it.

Hierarchical and hybrid backbones. Convolutional stages reduce resolution as they go, so later attention layers see far fewer tokens. FastViT is a hybrid design from Apple that uses reparameterized convolutional token mixing for low latency on mobile hardware. MobileCLIP trained fast image-text encoders on this kind of backbone with distillation from strong teachers. FastViTHD adds an extra stage and a 64× total downsampling so that high-resolution inputs stay cheap. ConvLLaVA uses ConvNeXt for the same reason.

Merging inside the encoder. ToMe can be applied within the ViT itself, so later encoder layers process fewer tokens.

Quantization, distillation and faster decoding

The methods so far change how many tokens are processed. The next group changes how expensive each token is.

Quantization

Weight-only quantization stores weights in 4 or fewer bits and converts them on the fly. AWQ protects the small set of weight channels that matter most, identified from activation statistics. It was the first such method shown to work for multimodal language models, and its TinyChat runtime runs 4-bit VLMs on desktop and mobile GPUs. Gemma 3 ships quantization-aware trained checkpoints. Its report gives 72.7 GB for the 27B model in BF16 at 32K context with KV cache, against 32.8 GB in int4. MiniCPM-V's 4-bit phone model is another example.

Vision and text tokens are not equally sensitive. MBQ found a significant difference in sensitivity between language and vision tokens, so calibrating as if they were the same overweights the less sensitive modality. Balancing the two improved accuracy by up to 4.4% at 3-bit weights and up to 11.6% at 4-bit weights with 8-bit activations, across 7B to 70B models.

Distillation

Distillation trains a small student to imitate a large teacher. LLaVA-KD distils both the output distribution and the relations between visual tokens, in a three-stage scheme. LLaVA-MoD gives the student a sparse mixture-of-experts language model and adds a preference-distillation stage. With 2B activated parameters it beat Qwen-VL-Chat-7B by 8.8% on average, using 0.3% of the training data. Gemma 3 was trained with distillation throughout. MobileCLIP showed that distilling from an ensemble of strong CLIP models gives fast encoders much better accuracy.

Faster decoding

Speculative decoding uses a small draft model to propose tokens and the large model to verify several at once. For a VLM, the draft does not have to see the image. Gagrani and colleagues found that a 115M-parameter language-only draft gave up to 2.37× memory-bound speed-up for LLaVA 7B. The draft skips the image tokens entirely. The verifier sees them through its KV cache.

Serving images at scale

Everything so far changes the model or its inputs. A serving system can also save a great deal without touching the model, by not doing the same work twice and by not letting stages block each other. The Serving Playbook explains continuous batching, paged KV memory, prefix caching and prefill-decode disaggregation for text. Images change each of them.

The encoder is a second model with different needs

The vision encoder has no KV cache and no decode loop. It runs once per image, is compute-bound, and batches well across images of the same tile size. The language model's decode phase is the opposite: memory-bound and ragged. When both share one GPU, a burst of large images can stall decoding for every other user. That shows up as spikes in time per output token for requests that have no image at all.

Preprocessing belongs in its own pool too. JPEG decoding, resizing and tiling are CPU work. At high request rates they can saturate the host CPUs while the GPU sits idle.

Cache the embeddings and hash the pixels

Users often ask several questions about one image, and many requests reuse the same document page. Two caches avoid repeating work.

An embedding cache stores connector outputs keyed by a hash of the image content and the preprocessing settings. A hit skips preprocessing and the encoder. vLLM keeps such an encoder cache, and its disaggregated-encoder design shares it across workers.

A prefix cache stores the KV blocks of a shared prompt prefix. A hit skips prefill for that prefix. There is a trap here. Inside the token sequence, every image appears as the same placeholder ids. A prefix cache keyed only on token ids would treat two different images as the same prefix and reuse one image's KV for the other. vLLM's design document describes the fix: the image hash from the preprocessor is added as an extra key to the hash of every block that contains that image. SGLang's radix cache does the equivalent by giving each image's placeholder tokens a pad value derived from the image hash.

Disaggregate encoding from prefill and decode

Prefill-decode disaggregation runs the two phases on different GPUs, so each can be batched and parallelised in its own way. DistServe, Splitwise and Mooncake developed it for text. VLMs add a third stage. Singh and colleagues proposed Encode-Prefill-Decode (EPD) disaggregation, which gives encoding its own resources, caches multimedia tokens for transfer, and parallelises the encoding of one request's many images. Against systems that keep encoding and prefill together, they reported up to 15× lower peak memory, up to 22× larger batches, and up to 71% lower TTFT. ModServe analysed production multimodal traces, which were heavy-tailed and bursty, and decoupled the stages so each could scale on its own. It reported 3.3× to 5.5× higher throughput while meeting latency targets on a 128-GPU cluster.

The idea is now in open serving stacks. vLLM added a disaggregated-encoder mode in which encoder instances write embeddings to a shared store and prefill-decode instances load them. In the project's December 2025 benchmark with Qwen3-VL-4B on four A100 GPUs, one encoder plus three prefill-decode instances doubled goodput for four-image requests with short text, from 6 to 12 queries per second, against four data-parallel replicas. InternVL3.5's report describes the same split as Decoupled Vision-Language Deployment, with the encoder on a vision server and the language model on another, pipelined asynchronously.

Figure 9Encode, prefill and decode on a timeline: colocated, cached and disaggregated

Figure 9. Four requests on one timeline. In a colocated server, encoding request C's large image stalls request A's decoding. A follow-up question about an already-seen image (D) can skip encoding and most of prefill, if the caches key on the image hash and not only on placeholder ids. With a separate encoder pool, encoding overlaps with decoding and the stall disappears. Durations are schematic.

Scheduling with images

Images make three scheduling problems harder.

Unknown prompt length. With dynamic resolution, the number of visual tokens is known only after preprocessing. Admission control must either preprocess first or estimate.

Indivisible encoder work. Chunked prefill, from Sarathi-Serve, splits a long prompt into chunks so that decode steps are not stalled. The language-model prefill over visual tokens can be chunked. The encoder pass over one image cannot be split without changing its result, so it remains a lump of work.

Memory in lumps. A text request grows its KV cache a token at a time. An image request claims thousands of tokens at once. Admission rules tuned for text can thrash when several such requests arrive together.

Images also offer a lever that text does not have. The server controls how many tokens an image becomes. Under load it can lower the maximum pixel count, the tile count, or the token budget of a Matryoshka-style model. That trades some quality for capacity instead of queueing.

Table 3 · Serving techniques for VLMs compared
TechniqueCost it reducesHelps most whenChanges model output?Engineering costFailure modeWhere it exists
Separate preprocessing poolCPU stalls on the critical pathhigh request rate, large imagesnolowCPU becomes the hidden bottleneckcommon practice
Encoder batchingencoder time per imagemany images of the same tile sizenolowpadding waste with mixed tile countsstandard in serving stacks
Embedding (encoder) cachepreprocessing and encoderrepeated images, multi-turn chatnolow to mediumkey must include preprocessing settingsvLLM encoder cache
Prefix cache with image hashprefill and KV memoryfollow-up questions, shared documentsnomediumplaceholder-only keys serve the wrong imagevLLM, SGLang
Chunked prefilldecode stalls behind long promptsmixed long and short requestsnomediumencoder pass stays indivisibleSarathi-Serve, vLLM, SGLang
Encoder disaggregation (EPD)interference, peak memory, TTFTmulti-image requests, bursty trafficnohighembedding transfer and routing overheadEPD paper, ModServe, vLLM, InternVL3.5 DvD
Prefill-decode disaggregationprefill-decode interferencestrict TTFT and per-token latency targetsnohighKV transfer bandwidthDistServe, Splitwise, Mooncake
KV cache compressiondecode bandwidth, concurrencylong answers, many images in contextyes, slightlymediumevicted detail cannot be recoveredVL-Cache, LOOK-M
Weight quantizationweight memory, decode timesmall GPUs, phones, long answersyes, slightlylowvision-text sensitivity mismatchAWQ, MBQ, QAT checkpoints
Speculative decodingdecode latencylow batch, long answersno (exact verification)mediumgains shrink at high batchlanguage-only drafts for LLaVA
Token budget as a load knobeverything downstream of the connectoroverload, mixed task difficultyyeslow if the model supports budgetssilent quality loss on dense imagesmax-pixel caps, M3-style budgets

How to read this table. The column "Changes model output?" splits the rows into two groups. The first seven rows are free in quality and cost only engineering. The last four trade some quality or exactness for capacity. A sensible order is to exhaust the free rows first, measuring as you go, before reaching for the ones that change answers.

Video multiplies every cost

A video is many images. At one frame per second, a ten-minute clip is 600 frames. At even 256 tokens per frame, that is about 150,000 tokens before any text. Every cost in this article scales with that number. Seeing in Time covers video models in depth. Here are the efficiency ideas that matter most.

Fewer tokens per frame. LLaMA-VID represents each frame with just two tokens. SlowFast-LLaVA keeps a slow pathway with few frames and many tokens each, and a fast pathway with many frames and heavy spatial pooling, without any training. Qwen2.5-VL groups two consecutive frames into one set of tokens. In its own evaluation it capped video input at 768 frames and 24,576 visual tokens.

Fewer frames. Adjacent frames are often nearly identical. LongVU uses DINOv2 features to drop frames that look like their neighbours, then reduces tokens further with a question-guided query and spatial reduction across frames.

Scale, then compress. NVILA first raises spatial and temporal resolution and then compresses the visual tokens. It reported 1.6× to 2.2× faster prefill and 1.2× to 2.8× faster decoding than comparable models, along with lower training cost.

Extreme compression. LLaVA-Mini's one-token-per-image design reported processing over 10,000 frames on a GPU with 24 GB of memory.

Redundancy is far higher across frames than within an image. That makes video the place where aggressive compression is safest, except for the same weak spots as before: small text in a frame, and brief events that appear in only a few frames.

Measuring efficiency honestly

Efficiency claims are easy to make and hard to compare. The problems above suggest a checklist. Measuring What a VLM Can Do covers benchmark design more broadly.

A practical order of operations

Putting the pieces together gives an order in which to try things. It starts with steps that do not change answers and moves towards steps that do.

  1. Measure your traffic. Record image sizes, images per request, answer lengths, follow-up rate, and the share of requests that read text or ask for locations. This decides which stage dominates.
  2. Fix the serving basics. Separate preprocessing, batch the encoder, add an embedding cache, and make sure the prefix cache keys on image hashes. These are free in quality.
  3. Set a resolution policy. Cap maximum pixels per image and per request at a level your hardest common task still tolerates. For document traffic, keep resolution high. For scene traffic, lower it.
  4. Pick the model's token budget. Prefer a model with built-in compression (pixel shuffle or a 2 × 2 merge) and, where available, an adjustable budget. If you train your own model, the inference-optimal study argues for a larger language model with fewer visual tokens for reasoning traffic.
  5. Consider training-free reduction. If you still need savings, start with question-independent, kernel-friendly methods such as encoder-side diversity or duplication pruning. Test on your text and grounding slices against random and pooling.
  6. Quantize and shrink. Use 4-bit weights for memory and decode speed. Move to a small or distilled model when the task allows. On devices, budget encoder latency first.
  7. Disaggregate when scale demands it. When multi-image or bursty traffic causes interference, split the encoder from the language model, and later prefill from decode.

The next article, Searching With Pixels, turns to a setting where the cost of a picture is paid millions of times over: indexing images and pages for retrieval, and choosing which few to show a VLM at all.

Key insights and nuances

References

Grouped by topic. Every entry links to its primary source.

Image token costs in deployed systems

Training-free pruning and merging