Blackwell Shenanigans
Blackwell Shenanigans 003: Gemma 4 MTP on a B300
Google shipped Gemma 4 assistant drafters, SGLang merged Frozen-KV MTP support, and a single B300 turned it into a real 1.6x decode-speed win.
Blackwell Shenanigans
Google shipped Gemma 4 assistant drafters, SGLang merged Frozen-KV MTP support, and a single B300 turned it into a real 1.6x decode-speed win.
The brief was wonderfully irresponsible in the useful way: Google had released Gemma 4 assistant drafters, SGLang had a fresh Gemma 4 MTP path, and we had a single Yotta B300 with about
275 GBof VRAM sitting there looking too expensive to leave idle.So we did the obvious thing: put
google/gemma-4-26B-A4B-iton the B300, pair it withgoogle/gemma-4-26B-A4B-it-assistant, serve it through SGLang, and make a little race dashboard because watching throughput tick upward is more emotionally honest than pretending this is normal lab behavior.The useful result:
Gemma 4 MTP averaged
1.628xfaster decode throughput than target-only SGLang across the tested matrix.No multi-GPU heroics. No vendor endpoint. One
NVIDIA B300 SXM6 AC, one SGLang server at a time, baseline first, MTP second.What Changed Upstream
SGLang PR #24436 added Gemma 4 MTP support and was merged on
2026-05-07.The important bit is that Gemma 4's assistant checkpoints are not ordinary EAGLE3-style draft models. The SGLang PR introduces a
FROZEN_KV_MTPspeculative path where the assistant uses the target model's KV cache instead of owning a separate KV cache.In practice, the launcher can still pass:
SGLang recognizes the Gemma 4 assistant and promotes the path internally to the Gemma-specific Frozen-KV MTP implementation.
Hardware And Stack
The test box was a Yotta B300 instance:
The serving stack was pinned instead of trusting whatever the day had lying around:
B300 reports
sm_103, so the CUDA 12.8 toolchain was not enough for the JIT path. The final box needed CUDA 13 NVCC plus the CUDA 13 cuRAND development package:That was not glamorous. It was, however, the difference between “Blackwell benchmark” and “compiler error wearing a lab coat.”
The Actual SGLang Config
Baseline used the same target model without speculative flags:
The MTP run added:
The launch environment also mattered:
The actual launcher that produced the run is here:
The Benchmark Command
This was the benchmark shape for the result below:
The dashboard watched:
The final public artifacts are here:
Why Forced Decode Was Necessary
The first pass used
MAX_TOKENS=2048and let the model stop naturally. That produced a tempting but broken comparison: several long-context decode cells ended after roughly one second because the model simply answered and stopped.That is not a throughput benchmark. That is Gemma politely leaving the room.
The final pass set:
That forced the decode cells to run for the configured window, except for one fast
0-context, concurrency=1MTP cell that hit the8192token cap at about25.2s. Every other comparison cell ran at roughly30s.Results
Forced-output aggregate decode throughput:
Average speedup across the matrix:
1.628x. Minimum speedup:1.403x. Maximum speedup:1.868x.That is a real result. The interesting part is not just the zero-context speedup, either. The 32k context cells still improved:
The earlier long-context cliff disappeared once the benchmark forced sustained decode.
Why There Are Zero-Context Rows
The
0context rows are not the target workload. They are the control lane. They answer: how much does Gemma 4 MTP help pure decode before cached-prefix attention, KV-cache pressure, and long-context memory traffic enter the story?There are three zero-context rows because the second axis is concurrency:
So
0/C1,0/C4, and0/C8are three different serving situations, not three copies of the same test. That matters because speculative decoding is batch-sensitive. The control lane tells us whether MTP is helping the decode loop itself, and the8k/32klanes tell us how much of that survives once context is involved.What Happened At 100k?
We did not run a
100kor128kdecode cell in the final comparison matrix. The benchmark did run prefill/TTFT checks up to128kbefore decode:That proves the long-prefix ingest path worked on this B300. It does not prove decode throughput at
100k+context under concurrency.The next long-context race card should be
64kand128kdecode with lower concurrency first:I would not jump straight to
128k/C8until the token budget is checked.concurrency * (context + max_tokens)gets impolite very quickly.What I Believe
This is worth treating as a practical serving knob, not just a fun PR stunt.
The B300 had enough memory to serve the 26B-A4B target plus assistant on one GPU with
TP_SIZE=1. The MTP path loaded cleanly, captured the Frozen-KV draft CUDA graphs, passed smoke tests, and produced better throughput across every measured cell.The acceptance rates were also strong. High throughput with terrible acceptance is just a benchmark wearing fake glasses. This run had
0.84-1.00accept rate across the forced-output matrix.The next sensible experiments:
topk=3andtopk=5.131072context cells after increasing the decode token budget.31BGemma 4 target on the same B300.For now, the answer to “does Gemma 4 MTP do real work on a single rented Blackwell B300?” is yes.
Annoyingly, satisfyingly, measurably yes.