AI Engineer World's Fair 2026

Is Speculative Decoding Worth It? Profiling vLLM on NVIDIA Blackwell — Akamai

Loading slides…

Read the talk

Is Speculative Decoding Worth It? Profiling vLLM on NVIDIA Blackwell

A small model can draft several tokens for a larger model to verify together. Sheilah Kirui’s vLLM demonstration shows why the payoff depends on prediction accuracy, spare GPU memory, and how much of a request is spent generating the answer.

From a talk by Sheilah Kirui

At a glance

Ideas worth remembering

  • Speculative decoding uses a small model to draft several tokens and a target model to verify them in one pass. Rejection requires target-model correction.

  • The structured-output demonstration generated 1.6× faster with high acceptance; the high-temperature creative task had low acceptance.

  • A useful draft must be cheap, predict tokens the target accepts, and fit alongside the target and both KV caches. Shared tokenization simplifies the setup.

  • Spare VRAM, smaller batches, and substantial output generation make better candidates. Long-context requests with short answers leave less time for faster decoding to save.

The expensive part: writing one token at a time

An application using a large language model can spend hundreds of forward passes writing a single answer. Each new token depends on the tokens before it, so ordinary generation proceeds one token at a time. In this talk, Sheilah Kirui, a developer advocate at Akamai, starts with that latency problem and asks when speculative decoding is worth enabling.

The distinction between two inference phases explains where the opportunity sits:

  • Prefill: The model processes the input prompt and builds a KV cache, which Kirui describes as its working memory for the rest of the request. This initial prompt processing happens once.
  • Decode: The model writes the answer, repeatedly using the preceding tokens to generate the next one.

A large model such as the Llama 70-billion-parameter model makes those repeated generation passes expensive. Speculative decoding targets this second phase.

0:120:39

Draft cheaply, verify with the target model

A smaller draft model does some of the next-token guesswork. Its generation is still autoregressive: it also predicts tokens one after another. The advantage is that each of its passes is cheaper and faster. Instead of asking the large target model to generate every token individually, the system asks it to verify a group of proposed tokens in one forward pass.

Kirui gives a typical draft length of three to five tokens per cycle. The target model approves or rejects those proposals and recomputes rejected tokens. This preserves the target model’s role in determining the answer. The talk describes this as keeping the output the same, but does not specify the sampling and rejection procedure; that statement should not be read as a promise of identical text across separate stochastic runs.

What happens to a proposal after verification? The useful relationship is a branch: accepted tokens can contribute to the answer, while rejected proposals require the target model to supply corrections. High acceptance lets one expensive verification pass carry more useful generation forward. Frequent rejection reduces the value of the draft work.

Where draft work survives verification

Small draft modelGenerates a proposed group, typically three to five tokens.
Target-model verificationChecks the proposals in one forward pass.
Accepted tokensDraft predictions approved by the target contribute to generation.
Target correctionThe target recomputes rejected tokens.
The target verifies a group of proposals together. Acceptance retains useful draft work; rejection requires target-model correction. This shows the talk’s conceptual branches, rather than a detailed sampling algorithm.
Read the diagram as text
  • Small draft model. Generates a proposed group, typically three to five tokens.
  • Target-model verification. Checks the proposals in one forward pass.
  • Accepted tokens. Draft predictions approved by the target contribute to generation.
  • Target correction. The target recomputes rejected tokens.
  • Small draft model → Target-model verification: Proposed tokens.
  • Target-model verification → Accepted tokens: Approved.
  • Target-model verification → Target correction: Rejected.
1:091:39

The second model needs memory—and must earn its cost

“It’s not free.” Hosting a draft model adds its weights to GPU memory, and both models need space for their KV caches. A small model limits the added weight cost, but it does not remove the cache requirement. Spare GPU capacity is therefore part of the decision before any speedup measurement.

High concurrency makes this tradeoff harder. If the GPU is already busy serving many requests, extra drafting work competes with those requests. Kirui treats that as a poor starting point for speculation and later identifies smaller batches as a better candidate. The same optimization can make sense on a lightly loaded deployment and offer less value when serving capacity is already occupied.

Draft selection balances two questions: can it predict what the target would accept, and can it do so cheaply enough? A fast draft that repeatedly gets rejected spends work without advancing much of the answer. A more accurate draft must still cost only a fraction of the target’s generation work. Accuracy and speed have to be assessed together.

2:333:03

Fitting both comparisons on one Blackwell GPU

The demonstration uses one NVIDIA Blackwell GPU for both a baseline server and a speculative-decoding server. GPU utilization has to be divided between them, so the model choices are constrained by what fits. Kirui reports about 16 GB of baseline model weights and 2.5 GB for the draft model, leaving room for KV caching. The configuration view answers a practical question: how are the two serving setups fitted onto the shared GPU?

The demo setup pairs baseline vLLM (8B) with speculative vLLM (8B + 1B) on one Blackwell GPU; the VRAM table compares their weight and remaining KV-cache budgets.Open full source frame
The demo setup pairs baseline vLLM (8B) with speculative vLLM (8B + 1B) on one Blackwell GPU; the VRAM table compares their weight and remaining KV-cache budgets.

The selection guidelines extend beyond fitting the demo:

  • Model size: Kirui gives ten to fifty times smaller than the target as a typical draft-model guideline. That is a general recommendation, separate from the demo’s reported weight-memory figures.
  • Tokenizer compatibility: The models should share a tokenizer, ideally within the same model family. Otherwise, translating between tokenizers introduces extra work.
  • Cost and accuracy: The draft must remain inexpensive while predicting tokens the target is likely to accept.

The workload supplies the other half of that match. Coding, JSON, and SQL are presented as promising structured tasks because their next tokens can be easier for a small model to predict. Poetry and brainstorming allow more varied continuations. The expectation is therefore task-dependent acceptance, which the demonstration tests by switching between structured output and creative writing.

3:584:28

Structured output: high acceptance and 1.6× faster generation

The application offers two task tabs and runs the baseline and speculative setups at the same time. Its stated purpose is to compare acceptance rates across task types. The first structured-output run stalls. Kirui considers reconnecting and restarting the vLLM servers, checks that the setup is running, then gets the application responding and repeats the run. No cause for the interruption is established.

After recovery, the speculative setup on the right generates 1.6× faster. Its high acceptance rate is the key explanatory metric:

acceptance rate=draft tokens accepted by the targettotal tokens generated by the draft\text{acceptance rate} = \frac{\text{draft tokens accepted by the target}}{\text{total tokens generated by the draft}}

The numerator counts draft work that survives verification. When that fraction is high, the target can validate more useful tokens per pass, making the cheap drafting work worthwhile.

The results also show more generated tokens per second with speculation enabled. The side-by-side display answers two connected questions: how much faster did this task generate, and how much draft work did the target accept? Together, generation speed and acceptance explain this successful case. The 1.6× figure belongs to the demonstrated structured-output run on the shared GPU; it does not establish the same gain for other workloads or isolated production servers.

6:267:24

Creative writing: more variety, fewer accepted guesses

Switching to the creative task changes the important result: acceptance is low. The temperature is set high, and the task permits more variety in the next tokens. The creative-task result view answers whether the small model’s guesses still survive under those conditions. Kirui attributes the lower acceptance to the greater variety of possible continuations.

The verification mechanism still applies, but less draft work is useful. Rejected proposals require target-model correction, so a lower acceptance rate weakens the reason to pay for drafting. No numerical creative-task acceptance rate or speedup is stated. The supported comparison is that this case has much lower acceptance than the structured-output example, rather than a measured claim that creative writing always becomes slower.

10:0910:14

Long prompts leave less generation time to save

Context length adds a separate limitation. Speculative decoding accelerates answer generation; it does not accelerate reading the prompt. Retrieval-augmented generation and document analysis can supply a large amount of input, requiring substantial prompt processing and KV-cache construction before the answer begins.

A long prompt followed by a short answer leaves little decode work to optimize. Even a faster generation phase affects only a small part of that request’s total time. This is why the ratio of input to output matters alongside acceptance: a draft can predict well and still offer a limited end-to-end gain when most of the request is spent processing context.

The closing checklist asks what the application actually does:

  • Prediction: Is the output structured enough for the draft to achieve high acceptance, or is it a creative task with varied continuations?
  • Memory: Is there enough VRAM for the additional model and both KV caches?
  • Serving load: Are batches small and capacity available, or is the GPU already handling high concurrency?
  • Time spent decoding: Does the request generate enough output for faster decoding to materially affect completion time?

These conditions identify promising experiments. The structured demo then shows what to inspect: acceptance alongside generation speed and tokens per second.

10:5211:22

Starting with vLLM—and recognizing other approaches

In the Q&A, Kirui recommends vLLM, the serving engine used for this demonstration, as a place to start implementing speculative decoding. The two-model setup is one approach. She also names n-gram, Medusa, and EAGLE alternatives, without explaining their internal mechanisms or benchmarking them. The demonstration’s conclusions therefore apply to the setup shown, rather than a comparison across all speculative methods.

The practical invitation at the end is to replicate the experiment using Akamai Developers resources. Kirui’s focus there is inference optimization; other contributors cover AI agents, managed Kubernetes, and Akamai Functions. For this experiment, the useful question remains concrete: does a cheap draft produce enough accepted tokens to repay its memory and generation cost under the application’s real task, context length, and serving load?

12:2712:57
Transcript download
Full transcript

Loading transcript…