05.04

EAGLE, Medusa, and n-gram drafts

skillmaxingInference EngineeringEAGLE, Medusa, and n-gram drafts
Visual lesson

EAGLE, Medusa, and n-gram drafts

Included with Pro · 5:09
Lessons · 1,218 words

Speculative decoding only needs something that guesses the next few tokens cheaply. A separate small model from the same family is the obvious choice, but it is a whole second network: its own weights, its own KV cache, its own forward passes, and a tokenizer that has to match. Three other families of proposer avoid most of that cost, and each wins on a different kind of traffic.

Medusa and EAGLE bolt a small trained head onto the target model and feed it the target's internal state, so the guesser already knows what the big model is thinking. N-gram drafting, also called prompt lookup, trains nothing at all: it finds the last few tokens somewhere earlier in the prompt and proposes whatever came next. Because verification keeps the output identical to the target's, the choice between them is purely about speed, memory and effort.

Pro

Continue reading

Pro unlocks every video lesson, the full notes, worked sizing and cost calculations, and runnable configs across the Inference Engineering course, from GPUs and kernels to quantization, speculative decoding, disaggregation and production autoscaling.

Unlock full access to
Python with AIInference EngineeringAI researchComplete system design
30% off with LAUNCH30first payment
Buy now
View all plans ·Already Pro? Sign in