Strata's V100 kernels were tuned for low-bit files, and a 4-bit file runs the generic ones
Newer inference engines are being written for a single GPU generation. That raised a question for this server: would a build of Strata tuned only for the Tesla V100 run our 4-bit model faster? We measured before writing any code. The answer is that there is little left to take, and this piece shows the numbers behind that.
What was already tuned
Strata's authors published a V100 kernel study in October. It moved three decode kernels to faster layouts on the V100 and cut GPU work per step by 6.8% on their test file. Our server runs with that work active.
Their test file was a 2-bit quantization. Its expert weights are in the IQ2 formats and its dense weights are in K-quant formats. The source defines tuned kernels per format, and it lists which ones they cover:
| Kernel | Formats it covers | Formats in UD-Q4_K_XL |
|---|---|---|
| Tuned expert kernel, gate and up rows | IQ2_XXS, IQ2_S, IQ3_XXS, IQ3_S, IQ4_XS | Q4_K, with Q5_K in a few layers |
| Tuned dense kernel | Q3_K, Q4_K, Q5_K, Q6_K, IQ4_XS | Q8_0 |
The 4-bit file falls outside both lists. Its experts and its dense weights run on Strata's generic kernels on this card.
Where a decode step spends its time
Strata generates in steps. Each step checks a few drafted tokens in one pass through all 48 layers, which this server splits across the three cards. With the engine's timing switches on, a step averaged 36.25 ms and produced 2.65 tokens, over 3,860 steps. GPU work was 31.7 ms of that. Drafting took 2.4 ms and the rest was bookkeeping.
The engine's own stage table splits the GPU time like this:
| Stage | Time per step | Share of GPU time |
|---|---|---|
| Routed experts held in VRAM | 8.55 ms | 26.9% |
| Dense projections | 7.01 ms | 22.1% |
| Hyper-connection reads | 5.81 ms | 18.3% |
| Waits on CPU experts and copies | 3.87 ms | 12.2% |
| Attention and recurrent state | 1.88 ms | 5.9% |
| Shared expert and quantizing | 1.87 ms | 5.9% |
| Router and planning | 1.43 ms | 4.5% |
| Output head | 1.32 ms | 4.2% |
The three cards work one after another on a step, not side by side.
How fast the generic kernels already are
These kernels mostly read weights from memory, so the useful measure is how many gigabytes of weights a kernel gets through per second. We built Strata's own kernel benchmarks and ran them on one V100 with nothing else on the card.
The fastest rate any kernel reached was 847 GB/s, on the output head with one token. We use that as the card's practical ceiling.
Routed experts, 28 experts per call, on the file's real weights:
| Tokens sharing each expert | Gate and up rows | Down rows | Whole call |
|---|---|---|---|
| 1 | 560 to 573 GB/s | 476 to 484 GB/s | 155 to 158 µs |
| 3 | 259 GB/s | 201 to 207 GB/s | 344 to 352 µs |
| 4 | 201 to 202 GB/s | 156 to 157 GB/s | 451 µs |
Those are the Q4_K and Q5_1 layers, which make up most of the file. The kernels slow down sharply when several tokens in a step route to the same expert.
In real generation that case is rare. The engine logged 33.1 routed token and expert pairs per layer in a step, and 8.55 ms over 48 layers is 5.4 µs per pair. The benchmark's one-token case costs 5.5 µs per expert. The two match, so real steps run close to the top row: 56 to 68% of the ceiling.
Dense Q8_0 projections, at the engine's shapes:
| Shape | 1 token | 3 tokens | 4 tokens |
|---|---|---|---|
| 2560 to 10240 | 707 GB/s | 533 GB/s | 468 GB/s |
| 2560 to 12288 | 762 GB/s | 576 GB/s | 505 GB/s |
| 6144 to 2560 | 771 GB/s | 570 GB/s | 488 GB/s |
| Output head, 2560 to 248320 | 847 GB/s | 574 GB/s | 491 GB/s |
Steps checked about 3.4 tokens on average, so the dense kernels run at roughly 55 to 68% of the ceiling.
What a V100-specific kernel could gain
The bound leaves little room to speed the step up. If a new expert kernel for Q4_K and Q5_1 read weights at the full 847 GB/s, the expert stage would shrink by a little over a third. That is about 3 ms of a 36.25 ms step, or 8 to 9%.
That bound is an estimate, not a measurement, and a generous one. A 4-bit expert kernel has to unpack scales and codes that an 8-bit head does not, and the 847 GB/s figure is the simplest kernel in its easiest case. We wrote no kernel for this piece.
We also set the engine's alternative expert layouts (modes 4, 7 and 8). The source shows that they cover other formats, so on Q4_K and Q5_1 the engine ran the same kernel as before: the output matched bit for bit and nothing was faster. That was not a test of an alternative.
The engine does have a second kernel for these formats, and you switch it on with STRATA_EXPERT_V2K=1. Its source says the output is the same bits and that it was measured on one AMD card family only. We have not measured it on the V100.
The one switch that helped
Strata has a switch, STRATA_NO_MMVQ_ROWS2=1, that makes the dense Q8_0 kernel take one matrix row per block where it takes two by default. The source says the result is the same bits either way. Other cards have a measured setting for it; the V100 does not.
In the kernel benchmark it was faster at four tokens (59.6 to 54.5 µs on the 2560 to 10240 projection) and mixed at three. We then ran it in the engine: four cold starts, two with the switch and two without, in the order off, on, on, off, each followed by the same six requests and one two-request load.
| Run | GPU work per step, waits excluded |
|---|---|
| Switch off, first | 29.16 ms |
| Switch on, first | 28.92 ms |
| Switch on, second | 29.01 ms |
| Switch off, second | 29.45 ms |
The switch saved 0.34 ms a step on average, or 1.2% of GPU work. The dense stages moved by the same amount in both pairs. The output projection went from 1.79 and 1.80 ms to 1.66 and 1.67 ms. Tokens per second did not move by more than run-to-run variation, which is several percent on this server.
The conclusion
We are not building a V100-specific fork for this file. The tuned kernels skip its formats, but the generic ones are already within reach of the card's memory speed in the case that matters. A perfect expert kernel would be worth at most 9% on our estimate, and the one free switch is worth about 1% of GPU work.
A lower-bit file is a different trade. It moves fewer bytes per step and gets the tuned kernels, at a cost in fidelity that we have measured separately and that this piece does not revisit.
What this piece does not show
- A written kernel. The 8 to 9% bound is arithmetic on measured read rates. Only writing and measuring a kernel would settle what is reachable.
- Prompt reading. The profile and the benchmarks cover generation. Reading prompts uses different kernels, which we did not examine here.
- Output checks for the switch. We relied on the source's statement that the one-row setting gives the same bits. We did not compare outputs ourselves.
- More than one card or one run. The kernel benchmarks ran once on one of the three cards. The engine comparison is two runs per setting.
- The engine's second kernel for these formats.
STRATA_EXPERT_V2K=1is untested on this card, so the default kernel's rates are not the last word on what the existing code can do. - Other files and cards. Every figure is for UD-Q4_K_XL on a V100. Other quantizations use other kernels, and other cards have their own tuned settings.
- Benchmark shape. The expert benchmark gives every expert the same number of tokens. Real steps mix cases, and we matched them to the one-token row by cost per pair, not by logging the mix directly.
*Correction, 19 November 2026: an earlier version said the alternative expert layouts were tried on this file and were no faster. Those layouts do not apply to its formats, so that run tested nothing new. The text above now says so.*