Calculate the vision-token cost of a uniformly sampled video clip.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A video VLM uniformly samples 16 frames from a clip. The vision encoder turns each sampled frame into 256 vision tokens (no high-res tiling). Ignoring the text prompt, how many vision tokens does this clip contribute to the LLM's context?
Vision tokens for a sampled clip = frames sampled × tokens per frame. Here 16 × 256 = 4096. The clip's real length and frame rate never enter the math once you fix the sample.
Imagine making a flip-book of a long movie. You do not trace every single film cell — you pick a handful of pages and draw only those. The work you do depends on how many pages you picked and how detailed each drawing is, not on how long the original movie ran. Here the model picks 16 pages from the clip, and each page becomes 256 little stickers it can read. So the total stickers are just 16 times 256, which is 4096. The movie could be one minute or one hour — once you decide to keep 16 pages, the rest of the movie stops mattering for the count.
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.
Spend about 4 minutes: state the product formula, explain why source length drops out, then show the two linear levers with the 32-frame and 512-token variants.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Multiplying by the clip's original frame count (e.g. 18,000) instead of the 16 sampled frames. Sampling exists precisely so the source length drops out of the token math.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.