okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

albedocmake: strata_kernels links strata_kernels_cpu (iq_kernels.cu reads the latent colscale table from expert_layout.cpp; strata-q36ref failed to link)a4af4df61

main
2 files

files

README.md4.4 KiB
ab-runs.jsonl13.7 KiB

V100 (sm_70): the prompt's experts on FP16 tensor cores (2026-10-07)

On sm_70 the prompt path ran the routed experts on llama.cpp's MMQ, whose integer products are dp4a there (Volta has no int8 tensor cores), and IQ1_M layers on the FP16 path (each expert dequantized to global memory, then one cuBLAS call per product). gemm_iq_f16_grouped (src/kernels/cuda/iq_kernels.cu) runs a whole MMQ expert group per launch on the FP16 tensor cores (WMMA, FP32 sums): a block takes 128 weight rows of one expert and up to 256 of its token rows, dequantizes each weight superblock once into shared memory with dq_dispatch (the FP16 path's own formulas), and streams the FP16 activations through it, the next tile prefetched into registers. sm_70 takes it by default for the layers MMQ would take and for IQ1_M (which then rides MMQ's grouping); STRATA_PF_WMMA=0 is the old path, STRATA_PF_WMMA=1 turns it on for any CUDA card (not measured elsewhere).

Rig

As in 2026-10-07-v100-decode-kernels: V100-SXM2-32GB (PCIe gen3 x16), 2x Xeon Gold 6130 in a container with a ~15-CPU quota, CUDA 12.8; setup's IQ2_XS (gate/up IQ2_S on 34 layers, IQ2_XXS on 11, IQ1_M on 3; down Q2_0), setup's config (--prefill auto: 8,192-token chunks here) plus --pool-workers 14.

Prompt speed

tools/ab_engine.py, 3 rounds, the arms' order alternating, one server start per arm and round; the server's own prompt tokens/s. orig: e8ca9af as setup built it; off: this branch with STRATA_PF_WMMA=0; new: this branch.

Promptorigoffnewnew vs orig
26,359 tokens (median of 3)1,467 tok/s1,4621,608+9.6%
6,345 tokens (median of 3)1,390 tok/s1,3931,534+10.3%

All runs: ab-runs.jsonl (the spread between rounds is under 1%). The engine's phase table (STRATA_PREFILL_TIMING=1, the 26,352-token prompt, ms):

orignew
experts gate/up3,9133,670
experts down2,2291,212
dequant (the IQ1_M layers' FP16 path, and the rest of that phase)740575
GPU timeline17,39115,847

Decode does not use this path (decode tok/s in the same runs: within the noise).

Accuracy

Continuation (after)Comparedargmax agreementKL (top 20)perplexity
363 tokens of prose (26,359-token prompt)MMQ vs this98.3%0.008350.7 / 60.5
MMQ 8,192 vs 32,768-token chunks98.3%0.008450.7 / 50.6
MMQ 8,192 vs 16,384-token chunks93.6%0.017750.7 / 39.2
327 tokens of Python (12,676-token prompt)MMQ vs this94.5%0.03123.98 / 3.38
MMQ 8,192 vs 4,096-token chunks96.3%0.02533.98 / 3.49
MMQ 4,096 chunks vs this96.3%0.01703.49 / 3.38

Two MMQ runs of the same configuration were bit for bit the same. After a long prompt these continuations move this much from any change of the prompt path's arithmetic (the perplexities swing both ways); the change sits inside what the chunk size alone does. Two texts are not a quality benchmark; a run against a full-precision reference (llama.cpp, as in UNSLOTH_Q4) was not made.

Notes