Blog

We made vLLM beat Backboard’s Gemma 4 engine

On Gemma 4 12B and one RTX PRO 6000, vLLM 0.33.0 with a tuned config and five patches serves 5.4% more output tokens per second than Backboard’s published engine over 8 workloads, with p90 TTFT 1.09× faster. On the same GPU that is 1.07–1.33× the article’s vLLM recipe.

Magni16 min read

On November 9, Backboard published a benchmark of Gemma 4 12B in which its proprietary engine beat vLLM and SGLang on every metric it reported, 208 comparisons out of 208, on a single RTX PRO 6000 Blackwell. The engine isn’t public and neither are its kernels or raw results, so the only way to test the gap was from the open side. We reproduced the article’s vLLM and SGLang baselines first, then tuned and patched stock vLLM 0.33.0 until it matched and passed Backboard’s own published numbers.

One frozen configuration, run unchanged at all eight of the article’s workloads, delivers 5.4% more output throughput than Backboard as a geometric mean, and up to 14% more at concurrency 1. Its p90 time to first token (TTFT) is 1.09× faster than Backboard’s as a geometric mean, and up to 1.16× faster. On the same GPU it runs 1.07–1.33× faster than the vLLM recipe the article used as its baseline, while the target model stays in BF16 and still verifies every token.

The motivation is pretty simple. A closed engine that wins every comparison tells you the open engines leave speed on the table, but not where, so we wanted to find out how much of that lead an open stack could recover and what each piece of it costs. The answer turned out to be all of it, on throughput and on time to first token.

5.4% more output throughput than Backboard, geometric mean over 8 workloads. vLLM 0.33.0 with a tuned config and five patches, Gemma 4 12B in BF16 with its MTP draft, one RTX PRO 6000 Blackwell Server Edition. p90 TTFT 1.09× faster than Backboard’s, and 1.07–1.33× the article’s vLLM recipe measured on the same GPU. Backboard’s engine isn’t public, so throughput against it goes through the article’s published vLLM figures.

  • +5.4%output throughput against Backboard, geometric mean over 8 workloads
  • 1.09×faster p90 time to first token than Backboard, geometric mean over 8 workloads
  • 1.33×the article’s own vLLM recipe at 8K × 4, measured on the same GPU
Gemma 4 12B-it in BF16 with the gemma-4-12B-it-assistant MTP draft, one RTX PRO 6000 Blackwell Server Edition on Modal. Random prompts of 1K or 8K tokens, 1024 output tokens, concurrency 1 to 64, InferenceX client.

We made vLLM beat Backboard’s Gemma 4 engine

Output tokens per second, higher is better

Bars are scaled within each group

  • Ours, one frozen config
  • Backboard, as published
  • 1K × 1
    • Ours, one frozen config: 231 tok/s
    • Backboard, as published: 204 tok/s
  • 1K × 4
    • Ours, one frozen config: 816 tok/s
    • Backboard, as published: 779 tok/s
  • 1K × 16
    • Ours, one frozen config: 2,214 tok/s
    • Backboard, as published: 2,082 tok/s
  • 1K × 64
    • Ours, one frozen config: 3,901 tok/s
    • Backboard, as published: 3,822 tok/s
  • 8K × 1
    • Ours, one frozen config: 203 tok/s
    • Backboard, as published: 179 tok/s
  • 8K × 4
    • Ours, one frozen config: 528 tok/s
    • Backboard, as published: 530 tok/s
  • 8K × 16
    • Ours, one frozen config: 999 tok/s
    • Backboard, as published: 962 tok/s
  • 8K × 64
    • Ours, one frozen config: 1,256 tok/s
    • Backboard, as published: 1,254 tok/s
Workloads are input length × concurrency. Ours is our same-GPU speedup over the article’s vLLM recipe times the article’s vLLM figure, since Backboard’s engine can’t be run.

What did Backboard actually measure?

The article runs Gemma 4 12B-it in BF16 with Google’s official draft model, gemma-4-12B-it-assistant, on one RTX PRO 6000 Blackwell with 96 GB. The draft is what makes this a speculative-decoding benchmark. A small model guesses several tokens ahead, the 12B target checks all of them in one forward pass and keeps the ones it would have produced itself, so the speed depends on how many guesses survive as well as on how fast each step runs. The traffic comes from SemiAnalysis’s InferenceX client, with random-token prompts of 1K or 8K tokens, 1024 output tokens, and 1, 4, 16 or 64 requests in flight, giving the eight workloads in every table below.

Backboard describes two things about its own engine. Its draft head shortlists candidate tokens in 4-bit before rescoring them in BF16, and the target’s output is unchanged. Neither the engine, the kernels nor the server command lines for the baselines are published, so the baselines had to be rebuilt from the recipes the article names, the vLLM project’s own Gemma 4 recipe (MTP with four draft tokens, async scheduling, 90% GPU memory) and SGLang’s cookbook command (NEXTN with five steps and six draft tokens).

One setting the article doesn’t state turned out to be recoverable from its own numbers. If every request really produced exactly 1024 tokens, a request’s end-to-end latency would have to be at least 1,023 times its time per output token, and that bound has to survive into the p99 figures as well. Sixteen of the article’s 24 published pairs of p99 latency and p99 time per token break it, including vLLM at 1K × 1, whose 5,432 ms p99 latency sits under the 5,678 ms the bound demands. So the outputs varied in length, which matches InferenceX’s default of drawing each length from 80% to 100% of the target, and that’s the setting we used everywhere.

Could we even reproduce the baselines?

Before changing anything, the article’s vLLM recipe had to land where the article said it did. Run as published on a Modal RTX PRO 6000 Blackwell Server Edition, it came in between 0.9% and 3.1% above the article’s throughput at all eight workloads, inside the 5% tolerance we set before the first run. SGLang came in 7–17% faster than published, which we report but can’t explain from the outside. Both engines kept the order the article found, with vLLM ahead at every workload.

The article’s baseline recipes run as published, output tokens per second at seed 0. Higher is better.
WorkloadvLLM, oursvLLM, articleDifferenceSGLang, oursSGLang, articleDifference
1K × 1190.4186.8+1.9%136.9122.6+11.7%
1K × 4655.0649.0+0.9%499.1456.8+9.3%
1K × 161,9051,861+2.4%1,2991,122+15.8%
1K × 643,6683,634+0.9%2,0391,750+16.5%
8K × 1164.6159.6+3.1%89.482.5+8.4%
8K × 4402.6395.7+1.8%287.9269.5+6.8%
8K × 16801.9794.5+0.9%587.5533.7+10.1%
8K × 641,0951,079+1.5%728.6673.6+8.2%

With vLLM reproduced to within a few percent, Backboard’s lead over it was real and sizeable, 1.34× at 8K × 4, where Backboard published 529.6 tokens per second against vLLM’s 395.7. That’s the workload most of the work below was aimed at.

Where does a decode step go on this GPU?

Gemma 4 12B has 48 layers of two kinds. Forty are sliding-window layers that attend to the last 1,024 tokens with eight KV heads of dimension 256, and eight are global layers that attend to the whole context with a single KV head of dimension 512. That split matters, because most of what vLLM decides about attention it decides once for the whole model, and those two layer types want opposite things.

The first gain came from the speculation depth. Drafting six tokens instead of four raised the average number of accepted tokens per step from 4.06 to 4.99, and at 8K × 4 that ran about 8% faster, 437.4 and 434.2 tokens per second over two runs against 402.6 and 402.0. Depth stops paying once the batch is large, though, since four draft tokens measured faster than six at 1K × 64, so the final config drafts six tokens up to 32 running requests and four above that.

The step time also had a cliff in it. vLLM’s Triton attention has a split-K kernel that divides a long context across many thread blocks, and it only uses it while the batch has at most 128 // num_kv_heads query rows, which for Gemma 4’s eight KV heads is 16, snapped to the nearest CUDA-graph capture size. Four requests verifying seven tokens each are 28 rows, so the global layers fell back to a kernel that ran about 24 thread blocks over an 8K context on a GPU with about 188 SMs. Dropping capture sizes 3 to 27 raised the threshold to 28, which took 8K × 4 from 435.8 to 472.4 tokens per second, 8.4% more, with the same math in a different reduction order.

That trick was a workaround, and a micro-benchmark showed why it wasn’t enough. With one threshold for both layer types, the right setting for the single-KV-head global layers is the wrong one for the sliding layers, so at 8K × 16 attention took 10.2 ms per forward with vLLM’s routing against 6.9 ms with the best path per layer type. The splitk_per_group patch gives each group its own threshold, 112 for the global layers and 8 for the sliding ones, and it replaces the capture-size list entirely, so the final config uses vLLM’s default capture sizes.

Is there any headroom left in the matrix multiplications?

A torch profile at 8K × 4 put 74% of GPU time in matrix multiplications, 20% in attention, 5% in normalization and activations, and less than 1% in sampling and speculation bookkeeping, with the GPU idle for 0.5%. So before writing kernels we checked whether the GEMMs had anything left to give.

The first benchmark said decode GEMMs ran faster than the time it takes to read the weights at all, 11.2 ms per forward against a 14.9 ms floor, which can’t be true. The GPU’s 128 MB L2 cache had been holding the weights between repeats, so we withdrew that run and rotated the weights through more memory than the cache holds. Measured cold, decode GEMMs take 15.8 ms per forward with 28 query rows, 94% of the weight-read floor at the 1.46 TB/s copy bandwidth we measured, and prefill GEMMs run at 341–427 TFLOPS against a measured peak of about 415–440.

There isn’t a kernel to write there. A CuTe DSL GEMM from NVIDIA’s CUTLASS examples for this architecture came in at 0.992× of cuBLAS on prefill, torch.compile with max-autotune never won, and this GPU has no wgmma or tcgen05 instructions to reach for. The one gain was a library upgrade, since cuBLAS 13.10 instead of the image’s 13.1 took 2–3% off every GEMM, interleaved against the stock library on the same GPU.

How much does the draft model cost per step?

We started out assuming, as our own source notes did, that the 12B assistant had a shortlist head that only scores a few thousand of the vocabulary’s tokens per step. Its config says otherwise. The shortlist exists only in the smaller E2B and E4B assistants, so the 12B draft reads its full tied embedding, 262,144 × 1,024 values in BF16 or 512 MB, for every token it drafts. That’s 395 µs per draft token at 28 rows, about 2.2 ms per six-token draft step at concurrency 4, inside a decode step of roughly 20 ms.

The mtp_draft_head_q patch scans an FP8 copy of that head, keeps the 32 highest-scoring tokens and rescores those 32 exactly in BF16, which takes the head from 395 to 212 µs. Against the BF16 argmax it picks the same top token 99.6% of the time on realistic activations, and a miss can only lower how many drafts are accepted, never what the target outputs, since the target still checks every token. Acceptance in serving didn’t move.

The patch also broke the first serving run. During CUDA-graph capture the draft sees uninitialized hidden states, every score came out NaN, and the “no candidate” sentinel of 2^30 became the drafted token and tripped the embedding’s index check, so neither point of that run was valid. The fix falls back to a valid token when every score is NaN.

A second, lossless draft patch runs the draft’s prefill only on the last prompt token, which is safe because the Gemma 4 draft reads the target’s KV cache rather than keeping its own. It added 2.6% at 8K × 16 and took 3.6% off mean TTFT at 8K × 1, with acceptance unchanged at 5.09 against 5.10.

We also tried a different drafter. DeepSeek’s DSpark for Gemma 4 12B accepted at least as many tokens as Google’s assistant, but its five full-width layers and 3.43 billion parameters most likely cost more per step than the extra acceptance saved, at 211.0 against 223.9 tokens per second at 1K × 1 and 443.4 against 497.8 at 8K × 4. DFlash and Eagle3 weren’t run, because the DSpark paper’s authors report both below DSpark on this model.

Why are 8K prompts slow to start?

Every request starts with a prefill, the forward pass over the whole prompt that fills the KV cache before the first token can come out, and at 8K tokens on this GPU it costs about half a second. A step-level model of vLLM’s scheduler, calibrated on our runs, put prefill at 31%, 55% and 69% of wall time at 8K with 4, 16 and 64 requests, since every new request’s prefill stalls the decode of everyone already running.

The upstream prefill attention reads each block of keys and values once per query head, and Gemma 4’s global layers have 16 query heads sharing a single KV head. Our kernel packs the query rows that share a KV head into one tile, so each block is read once per group. On one 8K prompt the first version, in Triton, took prefill attention from 191.2 to 108.0 ms, and a rewrite in Gluon for this GPU’s mma.sync instructions with explicit shared-memory staging brought it to about 190 TFLOPS and 73.1 ms.

We made vLLM beat Backboard’s Gemma 4 engine

Milliseconds across all 48 layers, lower is better

  • vLLM 0.33.0, Triton unified attention191.2 ms
  • Packed-head kernel, Triton108.0 ms
  • Packed-head kernel, Gluonabout 190 TFLOPS on both layer types73.1 ms
One 8K-token prompt prefilled as a single 8,192-token chunk, 8 global and 40 sliding-window layers, CUDA graphs, micro-benchmark on one RTX PRO 6000.

The patch sends only prefill rows to the new kernel and leaves decode and verification on vLLM’s, and it checks every layer shape against an FP32 reference at startup, falling back to the Triton version and then to upstream with a log line if one fails. One tile configuration did fail those checks in the bench and was excluded, and the first version’s outputs differed from vLLM’s only within BF16 rounding, at most 0.016 in absolute value.

Not every attempt at prefill paid off. Triton prefill tiles sized for this GPU’s shared memory made no measurable difference, because prefill is dominated by GEMMs rather than attention tiles, and a multi-stage cp.async version of the Gluon kernel was slower. A variant that shares one K/V tile across the sliding layers’ heads ran 1.12–1.16× faster in the bench, about 3 ms per prompt, but we couldn’t measure that in serving, so it isn’t in the final config.

The chunk size followed the kernel. Splitting prompts into 3,072-token chunks smoothed token delivery, taking p99 inter-token latency at 8K × 4 from 584 to 274 ms for a 1.4% throughput gain, but with prefill attention this much cheaper the final config runs each 8K prompt as one 8,192-token step instead.

Why did new requests still wait to start?

With those changes throughput was ahead of Backboard at six of eight workloads, but p90 TTFT was still worse at five of them. Per-request timings showed our median TTFT was already lower than the article recipe’s, so the gap wasn’t prefill speed, it was how long new requests waited to get in.

vLLM 0.33 with async scheduling keeps two batches in flight, so a request that arrives while the engine is waiting on batch N joins batch N+2 rather than N+1. Turning it off with --no-async-scheduling cost no throughput and took p90 TTFT at 1K × 16 from 302 to 219 ms and at 1K × 64 from 600 to 448 ms. Running two API servers and raising the token budget per step each shaved a few percent off TTFT but cost throughput, so neither went in.

At 8K × 1, where nothing queues, TTFT spent about 29 ms outside the engine, and 13.5 ms of it was Hugging Face’s tokenizer encoding the prompt. Switching vLLM entirely to the fastokens tokenizer produced identical token ids and cut median TTFT by 16–28 ms, but it also cost 3.6% of output throughput and raised p99 time per token by 22% at 8K × 1. That reproduced on two GPUs in both orders, and we never found the cause. The hybrid_tokenizer patch uses fastokens only to encode prompts and keeps Hugging Face’s tokenizer for every decode path, which takes encoding from 13.5 to 1.1 ms per 8K prompt with the same ids and the same streamed text, and leaves throughput and p99 time per token where they were.

How do you benchmark on a GPU you get once?

Modal assigns a different physical GPU to almost every launch, 19 distinct GPUs over 20 runs, and some of them run hot. At 8K × 64 one config gave 1,170 tokens per second on a GPU at 68–70 °C and 1,083.9 on another seed’s GPU, which averaged 83 °C and held its SM clock at 2,220 MHz instead of about 2,380. That 5–8% spread between machines was larger than what was left of the gap at 8K, so three seeds of unpaired runs could only call 8K a tie.

So every number in the final table is a pair. The article’s vLLM recipe and our config start fresh servers in one container on one GPU and run interleaved, in ABBA or BAAB order, so whatever the GPU contributes cancels out of the ratio. Pairs at one workload agree within 0.1–1%, and within 3% at 8K × 4. We tuned on seed 0 and confirmed on held-out seeds 1 and 2, which at 8K × 4 gave 1.320× and 1.335× against 1.326× on seed 0 for the config just before the TTFT changes. Adoption rules were written before each run, which is why one change that improved one metric was still rejected, as a later section shows.

Since Backboard’s engine can’t run on our GPU, throughput against it is the paired ratio multiplied by the article’s own vLLM-to-Backboard ratio, while TTFT is compared directly with Backboard’s published figures. That estimator’s error is dominated by single published runs rather than by our measurement, so its third digit shouldn’t be taken seriously.

The final config against Backboard’s published figures. Throughput in output tokens per second and p90 TTFT in milliseconds. Higher speedup is better.
WorkloadBackboard tok/sOurs tok/sThroughput speedupBackboard p90 TTFTOurs p90 TTFTTTFT speedup
1K × 12042311.14×85811.05×
1K × 47798161.05×1761521.16×
1K × 162,0822,2141.06×2452181.12×
1K × 643,8223,9011.02×5475101.07×
8K × 11792031.14×5495520.99×
8K × 45305281.00×7246561.10×
8K × 169629991.04×1,5371,3271.16×
8K × 641,2541,2561.00×3,1023,0051.03×

Does it still produce the same tokens?

The target is BF16 throughout, but speculation changes the shape of each forward pass, and with it the order of floating-point reductions. So we compared every config with a greedy BF16 reference that doesn’t speculate at all, on eight prompts of up to 7.9K tokens with 256 output tokens each.

Exact equality turned out to be out of reach for any speculative config in vLLM, the article’s own recipe included, which differs from the reference on four of the eight prompts. So the gate applies the same test to the recipe and to every candidate. Each first divergence has to be a near-tie, where the reference’s top two tokens are within 0.25 nats of each other, and the share of each output that matches before the first divergence can’t fall materially below the recipe’s. Every divergence of every config, ours and the recipe’s, was a near-tie. That says the kernels and the FP8 draft scan only change the output where the model itself is undecided, which is weaker than bit-for-bit identity, and we report it that way.

What didn’t make it in?

At 8K, a long prompt’s prefill holds up the decode of every request already running, so the slowest tokens come from the few requests that sit through other requests’ whole-prompt prefill steps of about 530 ms each.1 Capping the prefill chunk for long prompts spreads that out. Before running it we set the rule that a threshold would go in if it lowered p99 time per token at 8K × 4 while keeping p90 TTFT there under Backboard’s 724 ms and costing less than 0.5% throughput at 8K × 64. At 2,048 tokens, p99 time per token fell from 11.5–11.7 to 10.4–10.8 ms, but p90 TTFT rose to 969–1,126 ms because all four burst prompts were prefilled in parallel, so it failed the rule. At 4,096 tokens almost nothing moved, so the frozen config keeps whole-prompt prefill steps and the faster first token.

The remaining 8K prefill is mostly arithmetic we can’t remove exactly. Profiling one 7,772-token prefill step gave 527 ms on the GPU, with 409 ms in GEMMs already at 399–428 TFLOPS, 68 ms in attention, 22 ms in the memory-bound GELU and multiply, and 20 ms in norms, RoPE and residuals. A GEMM epilogue that fuses the GELU would save at most 22 ms, and a global-attention kernel above 250 TFLOPS about 12 ms, and we tried neither.

Where it stands

Backboard’s post showed a closed engine winning every comparison against open-source vLLM. Open-source vLLM, five switchable patches and a handful of flags on the same GPU serve more tokens per second than that engine’s published numbers and get the first token out sooner, with every baseline reproduced first and every number measured in pairs on one GPU.

The repository has the configs, the patches, the kernels and every measured run, and this article follows commit 4899cadb. The decision log records every change we adopted or rejected with its measured effect, and the paired results hold every same-GPU comparison behind the final table.

Notes

  1. The p99 time per output token at 8K is the one figure where Backboard is barely ahead, 10.3 against our 11.3 ms at 8K × 4 and about 4% at 8K × 16 and 8K × 64, while our median at 8K × 4 is 6.15 ms against 8.5 for the article’s vLLM recipe. ↑