veloGB10 currently treats Qwen FP8 mainly as a compressed storage format, not as native FP8
arithmetic.
For Qwen/Qwen3.8-27B-FP8:
- Weights remain packed as E4M3.
- Decode/verify converts FP8 weights to BF16 in registers and executes BF16 MMA.
- Prefill materializes each weight as BF16 and calls BF16 cuBLAS.
- The checkpoint’s intended dynamic FP8 activation path is not implemented.
This remains true at current v0.5.5, commit 135a2ec. That release improves flash-attention and GDN prefill, but not the linear FP8 GEMMs.
Exact code paths
Loading:
- src/gpu.rs:3735–3748 detects E4M3 weights with block-128 weight_scale_inv.
- src/gpu.rs:3419–3441 uploads them as W::Fp8Blk.
Decode and verification, N <= 16:
- Dispatch: src/gpu.rs:5214–5220
- Kernel: kernels/gpu_batch.cu:7125–7172
The hot loop performs:
FP8 bytes
→ software e4m3_f()
→ BF16 fragments
→ mma.sync ... bf16.bf16.f32
Prefill, N > 16:
- Dispatch: src/gpu.rs:4589–4966
- FP8 branch: src/gpu.rs:4952–4956
- Dequant kernel: kernels/gpu_batch.cu:8289–8295
It performs:
packed FP8 weight
→ full BF16 scratch matrix
→ BF16 cuBLAS GEMM
The scratch allocation is reused, but the full weight is dequantized, written and read again on every prefill invocation.
Ranked recommendations
This is the best low-risk first optimization.
Port the scheduling structure of:
gemm_dsv4_fp8_bsb2
at kernels/gpu_batch.cu:7290+ into a new:
gemm_mma_fp8_blk_b2
It should:
- process two adjacent 16-row output tiles per CTA;
- load each activation fragment once;
- reuse it for both output tiles;
- interleave two independent weight streams;
- preserve the current FP32 partial and scale application order.
No checkpoint or weight-layout change is required. Both adjacent tiles share the same 128-row weight-scale band.
The existing DSV4 comments explicitly identify the single-tile schedule as LPDDR-latency-limited at approximately 143–165 GB/s. The Qwen kernel currently uses that same single-tile structure.
Before implementing it, profile the current kernel. If it already reaches approximately 230 GB/s, stop—the hypothesis is wrong.
In gemm_mma_fp8_blk_b, each warp advances by eight 16-element K tiles:
for (int kb = warp; kb < nblk; kb += 8)A scale span also contains eight such tiles. Therefore each warp processes exactly one tile from every consecutive 128-K span, and the boundary branch executes on practically every iteration.
The loop can be expressed directly as:
zero raw partial
MMA one 16-K slice
load scale for kb >> 3
accumulate raw * scale
This preserves the current FP32-before-scale semantics and accumulation order while removing the boundary test, copy and re-zero sequence.
Do this together with the two-tile kernel rather than as a standalone optimization.
The current fp8_pair_bf16() calls e4m3_f() twice and then packs BF16 values.
With the current CUDA 13.0/PTX 9.0 build, try:
cvt.rn.f16x2.e4m3x2
followed by exact FP16-to-BF16 conversion. E4M3 values are exactly representable in both formats.
CUDA 13.2/PTX 9.2 adds the direct conversion:
cvt.rn.bf16x2.e4m3x2
This preserves the existing BF16 MMA arithmetic while eliminating software exponent reconstruction and branches. It is much lower-risk than changing immediately to native FP8 MMA.
The checkpoint declares:
{
"quant_method": "fp8",
"activation_scheme": "dynamic",
"weight_block_size": [128, 128]
}The matching operation is:
- activation: E4M3, dynamically quantized per token and per 128 K values;
- weight: E4M3 with 128×128 FP32/BF16 scales;
- output: BF16;
- accumulation: FP32.
CUTLASS already contains an exact SM120 example:
examples/87_blackwell_geforce_gemm_blockwise/87b_blackwell_geforce_fp8_bf16_gemm_groupwise.cu
It uses:
ElementA = float_e4m3_t;
ElementB = float_e4m3_t;
ScaleGranularityM = 1;
ScaleGranularityN = 128;
ScaleGranularityK = 128;
Sm120BlockwiseScaleConfig<1, 128, 128>That exactly matches Qwen’s dynamic activation and weight-scale layout.
For the first implementation:
- Dynamically quantize BF16 activations into E4M3 with [tokens, K/128] FP32 scales.
- Preserve a second, CUTLASS-compatible FP8 weight layout for prefill.
- Keep the current MMA-repacked layout for decode.
- Dispatch CUTLASS only above a measured token threshold.
- Retain dequant-plus-cuBLAS as the fallback.
The existing MXFP4 code already uses a similar dual-layout strategy.
CUDA exposes the exact modes:
CUBLASLT_MATMUL_MATRIX_SCALE_VEC128_32F
CUBLASLT_MATMUL_MATRIX_SCALE_BLK128x128_32F
They require CUDA ≥12.8 and cuBLAS ≥12.8.5. NVIDIA also ships an LtBlk128x128Fp8Matmul sample.
However, an independent public SM120/RTX 5090 probe reports that BLK128x128_32F + VEC128_32F returns CUBLAS_STATUS_NOT_SUPPORTED. The API appears available while the necessary algorithm is not available on that device.
Therefore extend the existing probe_gemm_lt() at src/gpu.rs:15766 with a heuristic-only blockscaled query and run it on GB10. If it returns zero algorithms, use the CUTLASS SM120 path instead.
The FP4 path already enables split-K for long K dimensions. Fp8Blk does not.
The Qwen FFN down projection has approximately:
M = 5120
K = 17408
Add:
gemm_mma_fp8_blk_splitk_b
and a prescaled reduction kernel without FP4’s tensor-scale epilogue.
This is medium effort and narrower in impact than the two-tile kernel, so it should come afterward.
Once native blockscaled FP8 prefill works, remove standalone activation-quantization traffic by fusing:
- RMSNorm → FP8 quantization;
- residual + RMSNorm → FP8 quantization;
- SiLU × up → FP8 quantization for down projection.
vLLM and related implementations already use these fusion patterns. This matters especially for small and medium prefills, where a separate activation pass can consume much of the GEMM gain.
Suggested implementation order
- Profile current gemm_mma_fp8_blk_b.
- Add a dedicated Qwen Fp8Blk microbenchmark.
- Implement gemm_mma_fp8_blk_b2.
- Try native packed FP8→BF16 conversion.
- Add a cuBLASLt capability probe.
- Prototype CUTLASS example 87b for prefill.
- Add FP8 split-K for K=17408.
- Consider producer→FP8 fusion.
Required gates:
- current kernel versus new kernel, actual Qwen shapes;
- N=1, 2, 4, 8, 16;
- bit-identical output for the two-tile BF16-MMA path;
- batch invariance of column zero;
- Nsight DRAM bandwidth and stall metrics;
- matched fresh/edit throughput;
- speculative acceptance;
- ToolEval hardmode quality.
veloGB10: Qwen3.8-27B-FP8 optimization review
Date: 2026-09-06
Project baseline:
veloGB10v0.5.5, release commit135a2ecTarget:
Qwen/Qwen3.8-27B-FP8text-decoder linear operations on NVIDIA GB10 / compute capability 12.1Reviewed proposal: veloGB10 - FP8 performance analysis
Executive conclusion
The reviewed gist is correct on the central point: in
veloGB10v0.5.5, Qwen block-FP8 is principally a weight-storage format, not a native dynamic-W8A8 execution path.T <= 16) loads E4M3 weight bytes, converts them to BF16 fragments, and executes BF16 tensor-core MMA.T > 16) dequantizes the complete weight matrix into a reusable BF16 scratch buffer and then calls BF16 cuBLAS.The gist's first three recommendations remain reasonable low-risk experiments, but their expected impact must be measured rather than assumed. Its CUTLASS recommendation is directionally strong, but the statement that the CUTLASS layout “exactly matches” the checkpoint is too broad: the mathematical scale granularity matches; the packed operand and scale layouts still require an explicit converter. The cuBLASLt idea should be a cheap capability probe only. Split-K should be conditional on profiler evidence, not part of the default implementation order.
The strongest additional implementation candidate is a packed W8A16 prefill bridge: reuse the existing E4M3 decode layout, convert weight tiles in registers, use BF16 MMA, apply FP32 block scales, and keep each weight tile resident while iterating over multiple token tiles. It removes the full BF16 weight scratch without first requiring dynamic activation quantization or a second full-model layout.
A separate, model-changing opportunity is an optional block-FP8
lm_head. The official checkpoint explicitly exemptslm_headfrom FP8; therefore this must be an opt-in derivative checkpoint, not the default. Its unsharded BF16 matrix is about 2.368 GiB, so the byte reduction is large enough to justify a controlled quality study.Recommended order
Fp8Blkmicrobenchmarkb2, direct scale fold, and native packed conversion as independent togglesb1retainedb2can lose through register pressure or insufficient CTA count.lm_headderivative and quality studyNo speedup number is claimed here. The report is based on tagged source, current primary documentation, and exact byte arithmetic; it does not include a GB10 benchmark run.
1. Evidence rules and notation
Each conclusion is classified as:
To avoid GEMM-convention ambiguity:
O= output features / weight rows.K= input features / weight columns.T= tokens or small verification batch.M=O,N=T.M=T,N=O,K=K.This distinction matters when mapping scale granularity and physical layouts.
2. Verified baseline
2.1 Model and quantization contract
The official configuration reports:
Qwen3_5ForConditionalGenerationSources: official config, including the model dimensions and layer pattern near the beginning of
text_config, and the quantization declaration at the end.Hugging Face's fine-grained FP8 specification defines this scheme as:
Source: Transformers fine-grained FP8 documentation.
The official checkpoint also contains a long
modules_to_not_convertlist. For the text path, relevant entries includelm_head,model.embed_tokens, and multiple linear-attention projection/state modules such asin_proj_a,in_proj_b, andin_proj_ba. Consequently, converting those tensors to FP8 creates a different model artifact and requires separate quality qualification. Source: official config.2.2
veloGB10block-FP8 storageW::Fp8Blkstores:[O/128, K/128]for divisible dimensions.The storage formula in the source is:
Source:
W::Fp8Blkinsrc/gpu.rs.Therefore block-scale overhead is exactly:
and total storage is:
The scale metadata is only 0.0244140625% of the raw FP8 weight bytes. Scale bandwidth is not the principal byte problem; full-weight BF16 materialization is.
2.3 Decode and verification path
For quantized weights and
T <= MAX_VERIFY, theW::Fp8Blkdispatch launchesgemm_mma_fp8_blk_b. The source explicitly pads the small token dimension to a fixed shape/order to preserve batch invariance. Source: tagged dispatch insrc/gpu.rs.The kernel:
fp8_pair_bf16()/e4m3_f()path;mma.sync.aligned.m16n8k16.row.col.f32.bf16.bf16.f32;Source:
gemm_mma_fp8_blk_binkernels/gpu_batch.cu.Verified conclusion: current Qwen decode is W8A16 with BF16 MMA, not native W8A8 tensor-core arithmetic.
2.4 Prefill path
For
W::Fp8Blkprefill, the dispatcher launchesdequant_fp8_blk_tiled_binto a persistent BF16 scratch allocation, then runs BF16 cuBLAS. The scratch is reused between calls, but each invocation rewrites and rereads the complete dequantized weight matrix. Sources: prefill dispatch, scratch allocation comments, and dequantization kernel.Verified conclusion: current Qwen prefill performs:
The v0.5.5 release reports FP8-path prefill gains from flash-attention and GDN changes, but it does not identify a native block-FP8 linear GEMM replacement. Source: v0.5.5 release.
2.5 Existing in-repository scheduling precedent
gemm_dsv4_fp8_bsb2processes two adjacent 16-row output tiles in one CTA, shares activation fragments, and interleaves independent weight streams. Its comments attribute low bandwidth in the single-tile DSV4 schedule to an insufficient per-warp memory stream for LPDDR latency hiding. Source:gemm_dsv4_fp8_bsb2.gemm_dsv4_fp8_bsb_pfalso demonstrates a prefill strategy that keeps a weight tile live while iterating over token chunks instead of writing a full dequantized weight matrix. Source:gemm_dsv4_fp8_bsb_pf.These are useful scheduling precedents, but not direct performance proof for Qwen because the DSV4 formats, scale types, operand precision, and shapes differ.
2.6 Hardware and build facts
NVIDIA specifies DGX Spark with 128 GB unified LPDDR5x and 273 GB/s memory bandwidth. Source: DGX Spark hardware documentation.
The project README reports approximately 255 GB/s sustained on its own bandwidth probe and describes the tested decode path as predominantly GEMM/weight-bandwidth bound. Those are project measurements, not universal values for every device state, tensor shape, TP degree, or prefill phase. Source: project README.
The tagged build script targets
sm_121, but obtainsnvccfromCUDA_HOMEor/usr/local/cudaand does not pin a CUDA/PTX version. Source:build.rs. Therefore the gist's phrase “the current CUDA 13.0/PTX 9.0 build” is not guaranteed by repository source alone. The runtime/build manifest should record the actual toolkit, PTX ISA, driver, flags, and binary hashes.3. Quantitative bounds
3.1 Dense down projection:
O=5120,K=17408This shape contains:
(5120/128)*(17408/128)*4= 21,760 B = 21.25 KiBThe current minimum excludes activation, output, cache, and implementation overhead. Removing full BF16 materialization cuts this particular weight-side byte count to about one fifth. That is a traffic bound, not a fivefold runtime prediction.
For the current 16-row decode tile:
5120/16 = 320CTAs before TP sharding;160CTAs before TP sharding.That CTA-count reduction is the main reason
b2must remain conditional: greater per-CTA instruction-level parallelism can be offset by lower grid parallelism or register pressure.3.2 Official BF16
lm_headUsing
vocab_size=248320andhidden_size=5120:At the project's reported 255 GB/s sustained bandwidth, reading the saved byte count once corresponds to an idealized lower-bound difference of about 4.98 ms. Actual latency depends on TP/vocabulary sharding, cache state, head implementation, launch overhead, logits processing, and whether the complete matrix is read. This number is a byte roofline only.
3.3 Strategic boundary
Native FP8 tensor-core arithmetic does not reduce the bytes of weights already stored in E4M3. Its possible benefits are:
For byte-bound decode, kernel changes that leave the same weight bytes must be justified by measured stall reduction, not peak-FLOP ratios.
4. Critique of the existing recommendations
Summary
b2halves CTA count.4.1 Two-tile Qwen decode kernel
What is supported: the repository already contains a two-output-tile DSV4 schedule that shares activation fragments and interleaves two weight streams. Adjacent Qwen 16-row tiles can also share the same 128-row scale band when CTAs pair tile indices
(0,1),(2,3), and so on. No checkpoint-format change is required.What is not yet supported by evidence: the DSV4 comment's reported 143–165 GB/s applies to that DSV4 kernel and its own shapes/format. It does not prove that
gemm_mma_fp8_blk_bhas the same bottleneck. Qwen's software E4M3 conversion, FP32 scale behavior, register lifetime, and tensor shapes are different.Risks:
O, further reducing available CTAs;Recommended implementation: keep
b1and addb2as a separate symbol. Autotune by exact(O,K,T,TP,device,toolchain)key. Addb4only afterb2resource data demonstrates room.Required measurements: registers/thread, local loads/stores, spill bytes, achieved occupancy, DRAM throughput, L2 hit rate, long-scoreboard stalls, tensor-pipe activity, kernel time, and end-to-end decode time.
The gist's fixed “stop if approximately 230 GB/s” threshold is too rigid. Compare against a contemporaneous sustained-bandwidth probe on the same machine, clocks, temperature, and concurrency state; also require end-to-end improvement.
4.2 Direct per-128K scale fold
The loop advances each warp by eight 16-K tiles:
A 128-K scale span is also eight 16-K tiles. For a fixed warp,
kb >> 3therefore advances by one on every loop iteration. It is valid to express the work as:instead of maintaining a multi-iteration raw partial plus a boundary branch.
Critique: the branch is warp-uniform, scale metadata is tiny, and a compiler may already simplify part of the control flow. This should be an independently switchable change and validated in SASS rather than assigned a material speedup in advance.
Correctness gate: byte-identical output to the existing kernel for every
Tin{1,2,4,8,16}, all actual Qwen shapes, and all TP degrees. The exact FP32 multiply/add order must remain unchanged.4.3 Native FP8-to-BF16 conversion
NVIDIA PTX documents packed E4M3 conversion forms.
cvt.rn.f16x2.e4m3x2is available before the direct BF16 form;cvt.rn.bf16x2.e4m3x2is introduced in PTX ISA 9.2. Source: PTXcvtinstruction documentation.Finite E4M3 values are exactly representable in FP16 and BF16 because both destination formats have greater mantissa precision and sufficient exponent range. However, complete bit-level equivalence still requires checking:
sm_121target.Recommended three-way implementation:
Add an exhaustive test over all 256 input byte values and every pair-combination needed to confirm packed lane ordering. Also scan loaded checkpoints for special codes. Inspect SASS to confirm that the desired native instructions were emitted.
This optimization can reduce instructions and branch/reconstruction work, but it cannot reduce weight bytes. Its end-to-end impact may therefore be small when DRAM latency/bandwidth dominates.
4.4 Native W8A8 prefill with CUTLASS
This is the largest architecture-level recommendation in the gist and remains valid, with qualifications.
Current CUTLASS example 87b uses:
(M,N,K)=(1,128,128);Sm120BlockwiseScaleConfig<1,128,128>;Source: CUTLASS example 87b.
This semantically matches fine-grained FP8 after mapping CUTLASS
M=T,N=O,K=K:The gist's “exactly matches the layout” wording is nevertheless too strong. CUTLASS deduces
LayoutSFAandLayoutSFB, and its B operand uses a CUTLASS-specific major/layout convention. A checkpoint's flat[O/128,K/128]FP32 scale matrix andveloGB10's decode-repacked E4M3 matrix are not automatically in those layouts. Current vLLM code explicitly constructs the deduced scale layouts and uses a separate SM12x-family wrapper; that is evidence that the mapping is an integration task, not pointer substitution. Source: vLLM SM120/SM121 blockwise CUTLASS dispatch.Required implementation work:
LayoutSFB;[T,ceil(K/128)]dequant scales;LayoutSFA;scaleversus inverse scale), E4M3 saturation, rounding, zero, NaN, and lane order;Memory critique: preserving both the current decode layout and a CUTLASS layout for every FP8 tensor duplicates nearly all FP8 weight bytes. That can cost many GiB. Use selective or lazy dual layout: rank tensors by measured prefill time and request frequency, then build only the layouts that amortize their memory cost.
Scheduling reference: current vLLM code swaps A/B for
M<=64, uses a ping-pong 64×128×128 configuration forM<=256, and a 128×128×128 cooperative/default configuration above that. Those thresholds are useful starting candidates, not GB10-optimal constants forveloGB10; retune with actual shapes. Source: vLLM dispatch.4.5 cuBLASLt block-scale probe
The gist correctly says not to assume support. The stronger conclusion from current NVIDIA documentation is that this should remain a capability/future-proofing probe, not a planned backend.
cuBLASLt exposes
CUBLASLT_MATMUL_MATRIX_SCALE_VEC128_32FandCUBLASLT_MATMUL_MATRIX_SCALE_BLK128x128_32F, but the current scaling-mode documentation describes those FP32 modes in the Hopper section and lists compute capability 9.0 support. The same table does not establish SM121 support. Source: cuBLAS documentation. NVIDIA also provides a sample for that mode, but the sample's existence does not imply an algorithm for GB10. Source: NVIDIA cuBLASLt sample.The documented operand pairing also matters: the supported construction is a VEC128 scale on one operand and BLK128×128 on the other; two BLK128×128 operands are not generally listed as a supported pair.
Recommended probe behavior:
CUBLAS_STATUS_NOT_SUPPORTEDas a normal result;An upstream PyTorch issue reports unsupported block-scaled cuBLASLt behavior on an SM120 system, which is corroborative but not a substitute for the GB10 probe. Source: PyTorch issue #192707.
4.6 Split-K for
K=17408Split-K can increase parallelism when a normal grid has too few waves or when one CTA's K loop is too long. Neither condition should be presumed here:
b1or 160 withb2;The existing FP4 split-K path proves that the project can implement the mechanism; it does not prove profitability for block-FP8.
Recommendation: implement only after Nsight shows either insufficient active waves/tail utilization or a dominant K-chain latency on the exact rank-local shape. Use fixed split counts, preallocated workspace, fixed-order non-atomic reduction, and separate numerical acceptance from bit-exact decode gates.
4.7 Activation-quantization fusion
The final direction is correct but should be split into two stages.
Stage 1: quantize once and reuse. A normalized activation is often consumed by sibling projections. For example, MLP gate/up projections share the same input, and attention/linear-attention projection groups can share an input. Produce one E4M3 activation tensor plus one
[T,K/128]scale tensor and reuse it across all compatible consumers. This removes duplicate quantization without requiring a larger fused kernel.Stage 2: producer fusion. After the W8A8 backend wins with standalone quantization, evaluate:
Fusion changes kernel boundaries, graph capture, register pressure, and arithmetic. It should not precede a validated standalone path because otherwise GEMM and quantization bugs become difficult to isolate.
5. Further recommendations
5.1 Add a packed W8A16 prefill bridge
Proposal: adapt the scheduling idea of
gemm_dsv4_fp8_bsb_pfto Qwen's existing block-FP8 representation:This path would:
It is not guaranteed to be bit-identical to the current cuBLAS prefill because accumulation order can differ, even if each dequantized product is the same. Use numerical and model-level gates, not byte equality to cuBLAS.
Likely dispatch role: small and medium
T, where a custom weight-stationary schedule may amortize weight loads without paying activation-quantization/layout overhead. Native CUTLASS W8A8 may win at largerT. Determine the crossover empirically.5.2 Make prefill a three-backend measured dispatch
Retain three implementations:
Autotune across actual shapes and token lengths, then persist the result. Do not use a single global token threshold because optimal choice can vary by
(O,K,T,TP), graph mode, and workspace state.Suggested token grid:
Also replay real prompt-length traces, including odd lengths and padded batches.
5.3 Optional block-FP8
lm_headderivativeThe official model exempts
lm_head, so leave default behavior unchanged. Add an explicit conversion tool and a distinct model identifier for an experimental block-FP8 head.The conversion should emit:
[ceil(248320/128),40]dequant scales;Evaluate:
Only after the head passes should other official BF16-exempt linear-attention projections be considered individually. Their exemption is evidence that default conversion is not intended; sensitivity must be measured tensor by tensor.
5.4 Add a per-tensor, per-phase byte/time ledger
Each linear invocation should optionally emit a machine-readable record:
Aggregate separately for:
This prevents optimizing a fast microkernel that is not a material end-to-end contributor.
5.5 Selective dual-layout policy
For CUTLASS, compute a profitability score such as:
Build a second layout only for tensors above a threshold. Cache it with a key containing:
Validate cache entries by size, alignment, checksum, and a small reference GEMM before use.
5.6 Deterministic autotuning
Candidate sets should stay small and interpretable:
Decode/verify
b1versusb2;Prefill
Tconfiguration.Tune at startup or offline, use synchronized warmups, interleave candidates to reduce clock/thermal bias, and persist decisions. Do not tune on live requests. Include device UUID, driver, toolkit/PTX, binary hash, shape, TP, and CUDA Graph mode in the key.
5.7 Separate numerical-change classes
Use three explicit acceptance classes.
Class A: expected bit-exact
Gate: byte equality, column-zero batch invariance, deterministic repeats.
Class B: deterministic but arithmetic-changing
Gate: numerical tolerances, logits/token tests, reproducibility, and end-to-end quality.
Class C: model-changing
lm_heador any officialmodules_to_not_converttensor;Gate: full quality qualification and a distinct model/checkpoint identity.
5.8 Validate checkpoint semantics at load time
For every
Fp8Blktensor, validate and log:For native W8A8, synthetic tests must distinguish:
A single wrong inversion or scale permutation can produce plausible-looking but incorrect outputs.
5.9 Record the actual toolchain
At startup or build packaging, record:
veloGB10commit/tag;nvccversion;sm_121/feature target;This is required because
build.rsselects the installed toolchain rather than enforcing one. It also makes conversion-instruction and CUTLASS regressions reproducible.5.10 Measure tensor parallelism end to end
A faster local GEMM can expose TP communication or synchronization as the new bottleneck. Benchmark:
Autotuning must use rank-local dimensions because TP changes CTA counts and may reverse
b1/b2or prefill-backend decisions.5.11 Add a dedicated
--probe-fp8blkThe project already uses probe-based development. Add a probe that loads actual model tensors and supports:
Run candidates interleaved, include fresh and edited prompt traces, and measure the sustained bandwidth probe in the same thermal window. Report both logical bytes and hardware counters.
5.12 Treat DeepGEMM as a tracked dependency, not a current GB10 plan
Current Transformers documentation describes DeepGEMM as a preferred backend for dynamic 128×128 fine-grained FP8 on supported Hopper/Blackwell systems. However, current DeepGEMM
mainexplicitly lists only SM90 and SM100 as requirements and uses architecture-specific scale formats; it does not advertise SM121 support. Sources: Transformers documentation and DeepGEMM README.There is active SM12x work and public issue reporting, but that is not equivalent to a stable, supported GB10 backend. Do not replace the CUTLASS plan with DeepGEMM unless a pinned revision:
CUTLASS 87b and vLLM's SM12x wrapper are currently the better source-level references for this project.
6. Revised implementation roadmap
P0 — measurement and low-risk decode work
--probe-fp8blkand the per-tensor byte/time ledger.T={1,2,4,8,16}and supported TP modes.gemm_mma_fp8_blk_b2without changing conversion or scale-fold logic.b1as fallback.P1 — remove prefill weight expansion
lm_headFP8 conversion as a distinct model-quality experiment.P2 — arithmetic-changing decode and advanced fusion
Tdecode, including A/B-swapped layouts where appropriate.7. Benchmark and acceptance protocol
7.1 Shapes
Include every actual rank-local linear shape from the loaded model, not only the dense down projection. At minimum include:
lm_headbaseline and optional FP8 derivative.Record full and TP-sharded dimensions.
7.2 Token sizes
Decode/verification:
Prefill:
Add real workload histograms and odd/padded batch shapes.
7.3 Conditions
Measure:
7.4 Metrics
Collect:
dram__bytesand DRAM throughput;7.5 Correctness gates
For Class A changes:
For Class B changes:
For Class C changes:
7.6 Promotion rule
Promote a kernel only when it passes correctness and improves the relevant end-to-end workload, not merely an isolated synthetic GEMM. Require stable benefit across repeated runs and no material peak-memory, graph-capture, TP, or tail-latency regression.
8. Specific source-review corrections
M=T,N=O; physical data and scale layouts still need conversion.sm_121but does not pin CUDA 13.0/PTX 9.0. Feature-detect conversion instructions at build time and record the actual toolchain.lm_headand relevant linear-attention tensors are BF16 by checkpoint design. Any FP8 conversion must be opt-in and quality-qualified.Sm120.9. Final assessment
The existing gist identifies the correct root problem and mostly sensible directions. The principal changes to its priority order are:
lm_headFP8 separately because it is the largest obvious BF16 byte lever but changes the official checkpoint.The dominant invariant is simple: Qwen's quantized linear weights already cost approximately one byte per weight. Decode optimization must improve how those bytes are consumed; prefill optimization should first stop writing and rereading a two-byte-per-weight scratch copy.
Sources
All web sources were accessed on 2026-09-06.