Speculative decoding is already on and batch size just climbed to 64, keep it or kill it?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Kill it. At batch 64, decode is already bandwidth-bound and the verify pass competes for the same HBM cycles. Spec decoding helps only when there is spare bandwidth headroom.
Picture a single delivery truck that can carry 64 boxes. Normally each box is one customer's order. Someone proposes a clever trick: send the driver to grab three extra speculative boxes along the route, in case the customer wants more. At an empty truck (1 order), this is great because there is plenty of room and the trip is short. At a full truck (64 orders), the extras crowd out real boxes and the trip takes longer. The trick only worked when there was slack capacity. Speculative decoding behaves the same way. Small batch has slack bandwidth, so verifying extra draft tokens is free. Large batch has no slack, so verifying the drafts steals room from real requests.
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.
5 min: anchor spec decoding as a spare-bandwidth trade, contrast batch 1 (headroom-rich) versus batch 64 (saturated), walk through the verify cost growing linearly in K, and close with the production pattern of batch-size gating.
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.
Reasoning about acceptance rate at large batch. The acceptance rate may be identical, but the verify pass now steals bandwidth from concurrent decodes, erasing the per-stream win in aggregate.
The night-before-the-interview bullets. Scan these on the way to the call.