How far is speculative decoding from its weight-read floor on one RTX 3090?

Updated 2026-10-18. The per-token correctness check on Qwen3-8B in 4-bit turned out to be noisy on that model, so I rewrote that section; DSpark is now marked unverified. I also corrected two numbers there: plain decoding’s own tokens reach a gap of 0.75 nats, not 0.5, and DSpark’s 40 extra runs stayed within 0.25 nats, not 0.75.

Updated 2026-10-18, later the same day. Three measurements added. Overlapping two streams of work does not read weights faster than a plain decode step, so the floor holds for it (in “Where one round goes”). The 4.6 ms jump between 32 and 40 checked tokens comes from the matrix-multiply library switching kernels (in “Guess several tokens, check them in one pass”). The run-to-run variation of the 4-bit Qwen3-8B does not come from its input, SGLang’s deterministic mode does not remove it, and the bf16 model has none (in “Is the output really unchanged?”).

Generating text with a large language model on one GPU is slow for a simple reason: every new token requires reading the whole model from memory once. Speculative decoding gets around this by guessing several tokens cheaply and checking them all in a single pass of the big model. On my RTX 3090 it makes Llama-3.1-8B about three times faster without changing which tokens the model would choose.

I spent a few weeks looking for a way to make it faster still, on this one card. I did not find one. What I found instead is a way to see why. For every setup I measured, I can compute a floor for one round: the bytes the GPU must read, divided by the bandwidth a plain decoding step actually achieves on the same card. The best public methods are already close to that floor:

  • Llama-3.1-8B in bf16 with a tuned EAGLE-3 drafter: 31.9 ms per round against a floor of 26.6 ms.
  • Qwen3-8B with the DFlash drafter, in bf16 or 4-bit: within 6-8% of the floor.
  • The largest gap I found is 24%, on a 4-bit Llama.

These are profiled GPU times per round. Counting the per-request overheads a timed run also pays (prefill, host-side scheduling), the gaps are 9-28%.

This post builds that argument from the ground up. Part I explains why plain decoding is limited by memory traffic. Part II builds speculative decoding on top of that, one idea at a time. Part III is what I measured. If you already know how EAGLE works, skip to Part III.

Part I: why generating text is slow

Tokens, one at a time

A language model writes text one token (a word or a piece of a word) at a time, and each new token is computed from all the tokens before it. A request runs in two phases:

  • Prefill. The model reads the whole prompt in one pass.
  • Decode. The model then produces the answer one token per pass.

Each layer keeps a key and a value vector for every token it has seen, so that it does not recompute them on the next pass. This store is the KV cache. It grows by a fixed number of bytes for every token: about 147 KB per token for Qwen3-8B in bf16.

Left: the three prompt tokens go through the model in one pass and fill the KV cache with three entries. Right: each decode pass takes the newest token, reads the KV cache, produces one token and adds one entry.

A 512-token answer is therefore one prefill pass followed by 511 decode passes. Decode passes are where the time goes.

What one decode pass costs: reading the weights

In a decode pass, one token’s vector is multiplied by every weight matrix of the model. So the GPU has to read every weight from its memory once, to produce a single token. The one exception is the input embedding table, from which it reads only one row.

A GPU kernel can be limited by two things: how fast the GPU computes (FLOP/s) and how fast it reads memory (bytes/s). Which limit applies depends on the arithmetic intensity: the number of operations done per byte read. In a decode step each bf16 weight (2 bytes) is used for one multiply and one add, so the step does about 1 operation per byte. An RTX 3090 reads up to 936 GB/s and computes about 71 dense bf16 TFLOP/s (spec-sheet figures), so it only becomes compute-bound at about 76 operations per byte. A decode step is nowhere near that: it is memory-bound.

Attainable throughput against operations per byte, on log axes. A decode step of one token sits at about 1 operation per byte, deep in the memory-bound region; checking 32 tokens at once sits at about 32. The compute limit starts at about 76 operations per byte.

You can check this on a real card. Llama-3.1-8B in bf16 reads 15.0 GB of weights per token: the 16.06 GB checkpoint minus the 1.05 GB embedding table. My 3090 decodes it at 50.9 tokens per second, which is 19.6 ms per token. 15.0 GB in 19.6 ms is 765 GB/s, which is 82% of the card’s peak bandwidth.

GPU memory holds 15.0 GB of weights and the KV cache. All 15.0 GB stream into the compute units to turn token t into token t plus 1; at 765 GB/s that takes 19.6 ms. About 2 operations per weight for 2 bytes read is 1 operation per byte.

So at batch size 1, a good first estimate of decoding speed is bandwidth divided by the bytes read per token.

Number formats change the bytes

A bf16 weight takes 2 bytes. An fp8 weight takes 1 byte, and an int4 weight half a byte (plus a small scale per group of weights). Weight-only quantisation stores the weights in the small format and expands them to bf16 inside the kernel, so the arithmetic still happens in bf16. The RTX 3090 has no native fp8 arithmetic, but it can still read fp8 weights compactly this way: SGLang uses its “Marlin” kernels for that.

The 4-bit (AWQ) version of Llama-3.1-8B reads 4.68 GB per token: 3.63 GB of int4 weights for the transformer layers plus the 1.05 GB output layer, which stays in bf16. Plain decoding goes from 50.9 to 143.4 tokens per second. Note that 4-bit weights also raise the arithmetic intensity: each byte now feeds four operations instead of one, which moves 4-bit models closer to the compute limit.

Left: weights read per token, 15.0 GB in bf16 and 4.7 GB in 4-bit. Right: plain decoding speed, 51 tokens per second in bf16 and 143 in 4-bit.

Costs that are not bytes: launches and idle time

The GPU executes a pass as a sequence of kernels, and the CPU has to launch each one. When kernels are short, the GPU sits idle while it waits for the next launch. CUDA graphs remove most of this: the whole sequence is recorded once and then replayed with a single launch. Every number in this post was measured with CUDA graphs on. Even so, 0.3-1.5 ms of each speculative round below is idle GPU time.

Top: kernels launched one by one, with gaps between them while the GPU waits. Bottom: the same kernels replayed from a CUDA graph with one launch and no gaps.

Part II: speculative decoding, one idea at a time

Guess several tokens, check them in one pass

A cheap drafter proposes the next few tokens. The big target model then processes all of them in a single pass, exactly as it processes a prompt. One draft-then-check cycle is a round:

A time axis for one round of Llama-3.1-8B bf16 with EAGLE-3: six short draft steps take 7.8 ms, a draft extend step 1.4 ms, then one verify pass of the target over 32 candidate tokens takes 22.0 ms. With 0.7 ms of idle time the round takes 31.9 ms and produces 5.0 tokens on average.

For a bf16 model, checking several tokens costs about the same as producing one, because the weights are still read only once and only the arithmetic grows. For a 4-bit model the extra arithmetic shows up sooner, since each byte already feeds four times as many operations. I measured both:

  • Llama-3.1-8B in bf16: one plain decode step takes 19.6 ms. Checking 32 tokens takes 22.0 ms (1.1x).
  • Qwen3-8B in 4-bit: checking 1, 8, 16 and 32 tokens takes 7.4, 8.0, 8.4 and 11.9 ms (1.6x at 32).
Left: Qwen3-8B 4-bit, the time of one pass for 1, 8, 16 and 32 tokens rises from 7.4 to 11.9 ms. Right: Llama-3.1-8B bf16, the time of a whole speculative round against the number of tokens checked; it jumps between 32 and 40.

The right panel shows a cost the bandwidth argument does not predict. Going from 32 to 40 checked tokens makes the whole round 4.6 ms slower. Profiling both settings shows the extra time is all in the check, and almost all of it in its matrix multiplies: 4.4 of the 4.6 ms. Drafting and attention barely change. At 40 tokens the matrix-multiply library (cuBLAS) picks different kernels for three of each layer’s four matrix multiplies, and they are slower: the largest, the MLP’s gate-and-up projection, goes from 0.31 to 0.40 ms per layer, over 32 layers. Timing the same matrix shapes on their own puts the switches at 35 tokens (the attention output and MLP down projections) and at 40 (the gate-and-up projection). It matters for tuning, below.

Which guesses are kept

At temperature 0 (greedy decoding), the target checks the drafted tokens in order. A drafted token is kept only if it equals the target’s own top choice at that position. At the first mismatch the target’s own token is used instead, and the rest of the draft is thrown away. Every token in the output is therefore the target’s own top choice at its position. (Whether the text comes out byte-for-byte identical to plain decoding is a separate question, answered at the end of Part III.)

Drafted tokens sat, on, the, sofa, and. The target chooses sat, on, the, mat. The first three match and are kept; at the fourth the target says mat instead of sofa, so mat is used and the rest is not checked. The round produces four tokens.

The number of tokens one round produces is called tau (τ): the drafts that were kept, plus the one token the target always contributes. In the example above, τ = 4.

τ can be computed from per-step acceptance. Let c₁ be the chance that the first drafted token is kept, c₂ the chance that the second is kept given that the first was, and so on. The k-th draft survives only if all k checks pass, so

τ = 1 + c₁ + c₁c₂ + c₁c₂c₃ + …

For the EAGLE-3 drafter on Llama-3.1-8B I measured c = 0.92, 0.90, 0.84, 0.82, 0.77, 0.76, 0.74 over seven draft positions (with the EAGLE authors’ own code, SafeAILab/EAGLE, on the same tree shape). The formula gives τ = 5.04; SGLang’s direct measurement is 5.02.

Grey bars: the chance that the k-th drafted token is kept given the earlier ones were, from 0.92 down to 0.74. Red bars: the chance that all of the first k are kept, from 0.92 down to 0.25. Tau is 1 plus the sum of the red bars, 5.04.

With sampling (temperature above 0), exact rules exist that keep the output distribution identical to the target’s. The textbook rule accepts a drafted token with probability min(1, p_target / p_draft) and otherwise draws a replacement from the leftover probability mass. SGLang’s EAGLE verifier uses a target-only variant that does not use the draft’s probabilities: it accepts a drafted token with the target’s own probability for it. Either way, sampling accepts fewer tokens than greedy decoding: on the same setup, τ is 4.33 at temperature 1 against 5.35 at temperature 0 (EAGLE-3 with its default tree).

Trees instead of a single guess

Instead of one guess per position, the drafter can propose its top few candidates at each step, several steps deep, and let the target check the most promising N of them in one pass. A mask lets each candidate attend only to its own ancestors, so every path through the tree is scored at once. There are three knobs:

  • depth: how many steps the drafter runs;
  • top-k: how many candidates it keeps per step;
  • N: how many candidate tokens the target checks.
Left: a tree rooted at It, with is and was as the top two second tokens and two candidates under each. Right: a 7 by 7 attention mask in which each candidate may see only itself and its ancestors.

Four families of drafters

family example what it reads per round
small model of the same family Qwen3-0.6B drafting for Qwen3-8B the whole small model, once per draft step
draft head EAGLE-3: one transformer layer that reads the target’s own hidden states about 0.75 GB per draft step in bf16
block drafter DFlash: guesses a whole block of tokens in one pass its own 2.1 GB plus the target’s 1.24 GB output layer, once per round
copying n-gram lookup in the prompt and output so far no weights at all
Small model: a full small model, read once per draft step. Draft head: one layer that also reads the target hidden states, once per draft step. Block drafter: one pass per round over its own weights and the target output layer. Copying: a lookup with no model weights.

One formula for speed

Putting the pieces together:

tokens per second = τ ÷ (time per round)

The time per round is verify + drafting + idle on the GPU, plus a share of each request’s prefill and host-side work. For example, EAGLE-3 on Llama-3.1-8B in bf16 has τ = 5.02 and a timed round of 33.1 ms (31.9 ms of it is the GPU round in the timeline above), which gives 151.5 tokens per second. That is 2.98 times plain decoding (50.9 tokens per second). A new method can help in only two ways: raise τ, or shorten the round.

Part III: what I measured on one RTX 3090

All measurements use SGLang 0.5.20 with CUDA graphs, one request at a time, unless I say otherwise.

Compared against what? Tuning is half the story

The tree has to be tuned for the card. I swept N with EAGLE-3 at depth 7 on Llama-3.1-8B: τ rises steadily with N, but speed peaks at N = 32. Above 32 the round pays for the step in cost described above.

N 8 16 24 32 40 48 60 (default)
τ 3.95 4.58 4.92 5.02 5.17 5.22 5.35
ms per round 31.1 32.6 34.0 33.1 37.8 38.2 37.6
tokens/s 127.1 140.6 144.8 151.5 136.9 136.8 142.3
Left: tau rises from 3.95 to 5.35 as N goes from 8 to 60. Right: speed peaks at N equal to 32 with 152 tokens per second; the default N of 60 gives 142.

EAGLE-3’s default tree gives 142.3 tokens per second on this card, and the tuned tree gives 151.5: 6.5% more, from a configuration change alone. That is about the size of many published improvements, so it matters what a paper compares against.

The same effect works in the other direction. DFlash is reported to be faster than EAGLE-3. On this card, against the tuned EAGLE-3, it ran at 142.8 tokens per second against 151.4: a ratio of 0.94, with a 95% confidence interval of 0.89-1.02.

Where one round goes, and the weight-read floor

A round has to read the target’s weights once, plus whatever the drafter reads. Dividing those bytes by the bandwidth a plain decode step achieves on the same card gives the weight-read floor of the round. It is a floor for any method that reads these bytes at the bandwidth a plain decode step reaches. A method could only go below it by reading fewer bytes, or by reading them faster than a plain decode step does, for instance by running two kernels at once. I measured the second option with synthetic weights in Llama-3.1-8B’s shapes, without CUDA graphs. Checking 32 tokens alone read 679 GB/s. Running it at the same time as six draft-head passes, on two CUDA streams, read 702 GB/s combined: 3.5% more than the check alone, but less than the 745 GB/s that a plain one-token step through the same weights reaches in the same test. So on this card overlapping does not read faster than a plain decode step, and the floor holds for it. In that test overlapping hid about 15% of the drafting time; with 80-token draft passes it made the pair slower.

I profiled the round of the best method in five setups and split it into verify, drafting and idle GPU time. Here “drafting” counts only the time GPU kernels were running, so the first bar shows slightly less drafting (8.5 ms) than the timeline above (9.1 ms) and slightly more idle time.

Five stacked bars: verify, drafting and idle time per round, each with a black mark at its weight-read floor. Llama bf16 EAGLE-3 31.9 ms against 26.6; Llama 4-bit EAGLE-3 with an fp8 head 13.5 against 10.9; Qwen3 4-bit DFlash 13.2 against 12.4; Qwen3 bf16 short prompts DFlash 25.2 against 23.3; Qwen3 bf16 thinking DFlash 27.0 against 25.2.
setup best method GPU round (ms) timed round (ms) floor (ms) gap (GPU / timed)
Llama-3.1-8B bf16 EAGLE-3, tuned tree 31.9 33.1 26.6 20% / 25%
Llama-3.1-8B 4-bit EAGLE-3, fp8 head 13.5 14.0 10.9 24% / 28%
Qwen3-8B 4-bit DFlash 13.2 13.7 12.4 6% / 10%
Qwen3-8B bf16, short prompts DFlash, fp8 drafter 25.2 26.2 23.3 8% / 12%
Qwen3-8B bf16, thinking traces DFlash 27.0 27.5 25.2 7% / 9%

To check the floor arithmetic yourself, take the first row. The target reads 15.0 GB per round. The drafter reads 5.3 GB: seven passes of the head’s 0.75 GB, plus a 0.1 GB projection. At 765 GB/s that is 26.6 ms. A trick that only reschedules work therefore wins at most 31.9 / 26.6 = 1.20x here, unless it reads memory faster than a plain decode step.

The DFlash rows are the tightest: a single drafter pass per round leaves little that is not weight traffic.

4-bit targets shift the balance

With a 4-bit target, verifying drops to about 8 ms but drafting does not shrink. Drafting becomes 33-40% of the round, and the best tree gets smaller: depth 5 with N = 16, instead of depth 7 with N = 32. Storing the draft head’s linear layers in fp8 helps for the same reason: it took Llama-3.1-8B (4-bit) from 269.3 to 303.0 tokens per second at the same τ (4.22 and 4.23).

The speedup over plain decoding also falls, from 2.98x in bf16 to 2.11x in 4-bit (and 1.76x for Qwen3-8B in 4-bit with the best drafter that passed my correctness check). That is not because speculation got worse: plain decoding itself got 2.8 times faster.

More requests at once: batch size

When several requests share a pass, the verify step does more arithmetic per byte and stops being free sooner. With the best static tree for each batch size, the speedup over plain decoding falls:

Speedup over plain decoding with the best static tree: 2.98x at batch 1, 2.70x at 2, 2.36x at 4, 1.94x at 8; the best tree shrinks from depth 7 with N 32 to depth 3 with N 8.

Long prompts against long outputs

Each token’s position is encoded as a set of rotation angles (RoPE). The public EAGLE-3 head for Llama-3.1-8B was trained on sequences of up to 2,048 positions. I gave it prompts of 8k and 16k tokens (passages of Wikipedia text to summarise). There it meets relative distances it never saw in training, and τ collapses to about 1.3. In SGLang, EAGLE-3 then runs slower than plain decoding.

A simple fix is to let the head see only the last 1,024 tokens plus the first 4 (so-called sink tokens). That brings τ back to about 3.0. I measured this with the EAGLE authors’ own code, scoring the head against the target’s own continuations, because SGLang’s window option does not reach the draft steps. This fix is already published, and a head fine-tuned for long contexts is public too, so I did not pursue it further.

Tau against prompt length for the draft head. Seeing the whole prompt, tau falls from 3.8 at 2k tokens to 1.3 at 8k and 16k. With a window of the last 1,024 tokens plus 4 sink tokens it stays near 3.0.

Long outputs behave differently. I ran Qwen3-8B in thinking mode at its recommended sampling settings (temperature 0.6, top-p 0.95, top-k 20) on MATH-500, AIME 2024 and HumanEval problems, with traces up to 8,192 tokens. On the MATH-500 traces that ran past 4,000 tokens, DFlash’s τ in the first 2,000 output tokens is 1.06 times its τ after that, with a 95% interval of 1.00-1.13. That is no collapse. “Long context” is two different problems, and only the long-prompt one hurt the drafters I tested.

The small draft model, revisited

A recent benchmark (arXiv 2509.04474, Table 3) ran Qwen3-0.6B as the drafter for Qwen3-8B in thinking mode at temperature 0.6 on an RTX A6000. It had the highest τ of all drafters (6.34) but ran at 0.88x the speed of plain decoding.

On the 3090 in SGLang, the same pairing already runs at 2.3x plain decoding with its default settings (113 tokens per second). I do not know why the benchmark measured it so much slower; it used a different card and serving setup. Storing the small model’s weights in fp8 and cutting the candidates per step from 10 to 4 takes it to 130 tokens per second, 2.7x plain decoding.

Against DFlash, though, it still loses. Given the same fp8 treatment, DFlash runs at 144 tokens per second, and the small model reaches 0.90 of that. I also projected what would happen if its drafting ran right at its weight-read floor: even then it would be only 1.13 times DFlash. Verifying takes 21.9 ms of every round. On top of that, the round grows by about 3.8 ms on an average-length trace as the context grows, mostly because the small model has to read its own growing KV cache at every draft step.

DFlash 138 tokens per second with a bf16 drafter and 144 with fp8. Qwen3-0.6B as drafter: 113 in bf16, 116 in fp8, 130 in fp8 with 4 candidates per step. Hatched projections: 153 with drafting at 70 percent of its floor and 164 at the floor, 1.06x and 1.13x DFlash.

Is the output really unchanged?

Speculative decoding at temperature 0 only ever emits the target’s top choice, so in exact arithmetic the text is the same as plain decoding. In practice it is not byte-for-byte the same, even in bf16. Checking 32 tokens in one pass computes the target’s numbers with slightly different rounding than producing them one at a time. When two candidate tokens are almost tied, that rounding can flip which one is on top, and from there the two texts diverge. On Qwen3-8B in bf16, plain decoding run twice gives identical text on 60 of 60 prompts, but the speculative methods match it on only 16-22 of 60. On the 4-bit models even plain decoding does not repeat itself: two runs agree on only 15 of 60 prompts (Qwen3-8B) and 27 of 60 (Llama-3.1-8B). On Qwen3-8B I looked for the cause. Scoring the same 176-token answer ten times in a row, as the only request, in one SGLang engine gave ten different sets of numbers, and about three quarters of all scored tokens differed between two passes over the same texts. This did not change with SGLang’s deterministic mode or with a different attention kernel. The bf16 Qwen3-8B, run the same way, repeated bit for bit every time. So the variation does not come from the input, and it comes with the 4-bit model; I have not found the kernel responsible.

So comparing texts cannot tell an exact method from a slightly wrong one. I checked each emitted token instead. The target model alone scores the text, and for every token I measure how far its log-probability is below the target’s top choice at that position. I ran this check twice on the 4-bit setups, about two days apart, with the same models and software.

More than 99% of tokens have a gap of exactly zero for every method. On Llama-3.1-8B in 4-bit and on Qwen3-8B in bf16 with short prompts, every nonzero gap is at most 0.25 nats, for plain decoding and for every speculative method alike. In the small-model comparison (Qwen3-8B in bf16 with the thinking template) the two speculative methods stay within 0.25 nats and plain decoding within 0.5.

On Qwen3-8B in 4-bit the check itself is noisy: scoring one fixed answer ten times in a row, in each of two engines, gave largest gaps of 0, 0.25 and 0.5 nats. In the second run, plain decoding and four speculative methods produced the same 176-token answer to one prompt, byte for byte. Scoring those five identical texts gave largest gaps of 0, 0, 0, 0.25 and 0.875 nats. Plain decoding’s own tokens reached 0.75 nats. DFlash, the method I report for this setup, stayed within 0.625 nats in both runs. Two other methods each had a single token above 1 nat, once and not again: DeepSeek’s DSpark drafter, running in SGLang (1.5 nats in the first run, at a token no plain run produced), and the 0.6B draft model (1.25 nats in the second run). At that size this check cannot tell a rare defect from its own noise. DSpark was otherwise the fastest method on this setup (293 tokens per second), and in 40 further runs its tokens stayed within 0.25 nats. I leave it out of the comparison as unverified, not as shown to be wrong.

Left, Llama-3.1-8B 4-bit: every method, plain decoding included, stays at or below 0.25 nats in both runs. Right, Qwen3-8B 4-bit: plain decoding and DFlash stay at or below 0.625 nats in both runs; the EAGLE-3 head reaches 0.875, n-gram copying 0.75 and the 0.6B draft model 1.25 in the second run; DSpark reaches 1.5 in the first run and 1.0 in the second.

What to take away

  • Ask what a speedup is compared against. Retuning a tree for the card gave 6.5% here, about the size of a published improvement.
  • Compute the weight-read floor of a round before believing a trick that reschedules or overlaps work. It takes one division: bytes per round divided by the bandwidth of a plain decode step.
  • On a 24 GB consumer card at batch size 1, the best public drafters are within 6-24% of that floor (9-28% with per-request overheads). What is left has to come from reading fewer bytes, reading them faster than plain decoding does, or accepting more tokens per round.

Scope

One RTX 3090 (24 GB) in SGLang 0.5.20 with CUDA graphs, one request at a time unless stated; Llama-3.1-8B-Instruct and Qwen3-8B in bf16 and AWQ-INT4; 60 Spec-Bench prompts for short outputs, 20 Wikipedia passages per length for long prompts, and 10-30 MATH-500, AIME 2024 and HumanEval problems for thinking traces.

Reproduce

The scripts, the exact model and dataset revisions and the setup are in rockyshi-dev/spec-decoding-rtx3090. The overlap, 40-token and run-to-run measurements are its open-questions section.