Diagnose why a projection-style VLM hits its context limit on 20-image requests
Click any words you think contain an error. Click again to unmark.
A projection-adapter turns every image into many tokens inside the LLM sequence, so 20 high-res images multiply the context — image count is exactly what fills the window. Fix it with cross-attention or a resampler.
Imagine your notebook has a fixed number of pages. Someone claims that taping in 20 photos cannot fill it because the photos go on the wall, not the pages. But this notebook actually transcribes each photo into a long block of writing on the pages themselves. Tape in 20 detailed photos and the writing fills every page before you even start your notes. The mistake is believing the photos stayed off the pages — they did not. To fix it, you either keep the photos on the wall and just glance at them, or you write a tiny one-line summary of each photo instead of the full transcription.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Name the error precisely: a projection-adapter inserts visual features as tokens in the sequence, so its no-tokens premise is false. Quantify the overflow as image count times tokens per image, and show how tiling multiplies tokens per image into the thousands. Then give the fix — cross-attention or a resampler to decouple image count from sequence length — and explain why simply enlarging the window only treats the symptom.
Real products, models, and research that use this idea.
- LLaVA-style projection connectors are exactly the design where many or high-res images inflate the sequence and overflow context
- AnyRes and dynamic-resolution tiling multiply tokens per image, the common trigger for context blowups on document scans
- Flamingo's cross-attention connector is the canonical fix that decouples sequence length from image count
- BLIP-2's Q-Former resampler compresses each image to a small fixed query-token set, capping the per-image token budget
- Production VLMs handling multi-image requests in 2026 pair a resampler with projection to bound the visual token load
What an interviewer would ask next. Try answering before peeking at the approach.
QIf you must keep the projection-adapter for training simplicity, how do you bound the token blowup?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Believing a projection-adapter keeps visual features out of the sequence, when its whole job is to insert them as tokens — which is precisely why image count drives the context overflow.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.