Contents
The model we study ships with a speculative drafter. Speculative decoding spends extra compute to propose several tokens at once and verifies them in one pass, which helps when a GPU is waiting on memory and hurts when it is already busy. Two RTX 3090 cards are an interesting test, because Ampere has plenty of compute headroom for one request and very little for sixty-four.
Getting it to run
The engine’s speculative worker requires a Hopper-generation attention kernel for the draft model. One experimental patch lets it use the Triton attention backend on SM8x instead. With that, the server starts with these flags, in addition to the four environment variables from the official recipe:
--speculative-algorithm DSPARK \
--speculative-num-draft-tokens 8 \
--speculative-draft-attention-backend triton
The draft length of eight is fixed by the checkpoint. We tried four and the server refused to start. The patch ignores one option that only applies beyond a 1,024-token window, which does not matter for short chats but is a known gap for long-context speculation.
The workload matters
Random token ids give a drafter nothing to predict, so a speculative benchmark on random text is meaningless. We used natural-text ShareGPT prompts with a 256-token output cap, closed-loop concurrency, a warm server and one run per point.
| Concurrency | Output tok/s baseline | Output tok/s treatment | Change treatment vs baseline | TTFT mean ms baseline | TTFT mean ms treatment | ITL mean ms baseline | ITL mean ms treatment | Requests |
|---|---|---|---|---|---|---|---|---|
| 1 | 75.0 | 89.2 | +19.0% | 198 | 211 | 12.7 | 10.7 | 16 |
| 4 | 214.9 | 187.3 | −12.9% | 328 | 316 | 17.6 | 19.4 | 16 |
| 16 | 482.6 | 300.8 | −37.7% | 1,424 | 577 | 28.0 | 49.6 | 64 |
| 64 | 383.8 | 323.7 | −15.7% | 6,223 | 29,001 | 135.9 | 66.8 | 256 |
| Measure | Value | Unit |
|---|---|---|
| Continuations identical to the non-speculative run (of 6, 256 tokens each) | 2 | prompts |
| Prompt 1: first divergence | 1 | token index |
| Prompt 1: top-1 minus top-2 margin at divergence, non-speculative | 0.028 | nats |
| Prompt 1: top-1 minus top-2 margin at divergence, speculative | 0.200 | nats |
| Prompt 2: first divergence | 11 | token index |
| Prompt 2: top-1 minus top-2 margin at divergence, non-speculative | 0.044 | nats |
| Prompt 2: top-1 minus top-2 margin at divergence, speculative | 0.085 | nats |
| Prompt 3: first divergence | 1 | token index |
| Prompt 3: top-1 minus top-2 margin at divergence, non-speculative | 0.107 | nats |
| Prompt 3: top-1 minus top-2 margin at divergence, speculative | 0.044 | nats |
| Prompt 5: first divergence | 166 | token index |
| Prompt 5: top-1 minus top-2 margin at divergence, non-speculative | 0.078 | nats |
| Prompt 5: top-1 minus top-2 margin at divergence, speculative | 0.139 | nats |
| Maximum prompt-logprob difference, speculative server vs non-speculative server (3 prompts) | 0 | nats |
What happened
For a single stream, throughput went from 75.0 to 89.2 tokens per second, a 19% gain, and mean inter-token latency fell from 12.7 ms to 10.7 ms. The mean accept length was 2.41 tokens per verification step, averaged over the whole server run rather than per concurrency level.
From four concurrent requests upward aggregate throughput was lower with speculation: 214.9 to 187.3 tokens per second at 4, 482.6 to 300.8 at 16, and 383.8 to 323.7 at 64. A plausible reading is that verifying eight tokens for each request in the batch turns a memory-bound step into a compute-bound one, so on these GPUs speculation helps latency for one user and costs throughput for many.
How far to trust that reading
- It is a reading, not a measurement of the cause. We have not profiled the speculative path.
- The graph cap. These runs used the default decode CUDA-graph cap of 48. A later experiment found that the cap makes decode at 64 concurrent requests run eagerly. Whether it also affected the speculative runs at four or more requests has not been measured; the re-run is planned.
- Correctness. Over six prompts of 256 greedy tokens, two continuations were identical to the non-speculative server. The other four diverged at tokens where the top two candidates were within 0.03 to 0.2 nats of each other in both runs, which is what numerical near-ties between the verify and decode kernels look like. Prompt log-probabilities were bit-identical, because the prefill path is untouched. That is consistent with lossless verification, but it is not proof, and six prompts is a small sample. A task-level evaluation is planned.
- One run per point on one rented host.
The experiment log has the configuration and the correctness table, and every run page links its raw output.