Repository navigation
[Config] MiniMax-M3 MXFP8: tune N=1280 K=6144 (DSpark context KV projection) - #7411
Conversation
…ection) Signed-off-by: Micah Williamson <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
NOT READY FOR HUMAN REVIEWPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
Summary
Adds 19 tuned rows for the MXFP8 bpreshuffle GEMM at N=1280, K=6144 (M = 1 … 65536) on gfx950 / 256 CUs to
configs/model_configs/minimax_m3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv.This is a CSV-only change: 19 rows added, none modified or removed.
Motivation
N=1280, K=6144 is the context KV projection used by MiniMax-M3.1-Flash DSpark speculative decoding.
The shape has no row in the current table, so
get_mxscale_bpreshuffle_configreturnsNone.That has two effects:
"mxscale bpreshuffle ... is untuned on gfx950" once per (N, K).
AiterMxfp8LinearKernel, viais_mxfp8_bpreshuffle_gemm_tuned) reject it and fall back to a Tritontl.dot_scaledkernel.The other MiniMax-M3 TP4 projections (QKV 2560x6144, out 6144x2048, shared gate/up 1536x6144,
shared down 6144x768) are already tuned. This was the remaining shape in the decode path.
Changes
minimax_m3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv: 19 rows,1x32block scale,libtype=flydsl,kernelId=bmm. M = 1, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 plusthe larger buckets up to 65536, matching the M grid of the other shapes in the file.
sk4at M=1,sk2at M=128,sk1from M=8192 up).errRatiois at most 0.0016 on every row.Performance
MI355X (gfx950, 256 CU), N=1280, K=6144, MXFP8 weights (bpreshuffle) and activations.
Method:
apply_weightspath (activation MXFP8 quantize + GEMM), so the numbers include quantization.dot_scaled(vLLM fallback)The tuner-reported kernel time, which excludes activation quantization, is 5.82 µs at M=1,
9.06 µs at M=128 and 79.12 µs at M=8192. That is 1628 TFLOPS at M=8192.
Decode-relevant buckets are M <= 128. The tuned rows give 1.0-1.2x over AITER's own heuristic and
1.3-1.7x over the Triton fallback there. The gains over the heuristic grow at prefill-sized M (up to 1.8x at M=4096).
In a profile of MiniMax-M3.1-Flash decode on MI355X, the M=128 row's kernel
(
bmm_a8w8_mxscale_t48x32x256_w1x2_nb6_sk2_bd2_b1_s32_1x32, about 10 µs) launches once per step.Testing
"Untuned" is the table on
main. "Tuned" ismain+ these 19 rows. Both use the same script and process setup.errRatio<= 0.0016 for all 19 rows.get_mxscale_bpreshuffle_config(M, 1280, 6144, "1x32")returns a config for M=1 and M=8192.On
mainit returnsNoneand logs the "untuned" warning.Documentation
N/A
Dependencies
None for AITER. The speedup over Triton is only reached in vLLM once the MXFP8 FlyDSL linear kernel lands
(
micah/m31-mxfp8-flydsl, vLLM PR TODO: link). Without it, vLLM does not use this table for this shape.Breaking Changes
None. The lookup is keyed by (N, K), so no other shape changes selection.
PR Self-Review
Before, this shape was untuned (heuristic kernel selection plus a warning). After, it selects a per-M kernel and split-K from the table.
The intent is to make this shape tuned, like the other MiniMax-M3 projections.
errRatiovalues are <= 0.0016, and the performance table is a CUDA-graph micro-benchmark on MI355X.Unverified: end-to-end accuracy and throughput. Only M=1..8192 were re-benchmarked outside the tuner. The M=16384..65536 rows come from the tuner only.
Single run per configuration, with the tuned and untuned runs on different GPUs, so differences of about 5% (M=1-16 and M=64) are within noise.
The only key affected is (gfx950, cu_num=256, N=1280, K=6144, w_scale 1x32).
It is consumed by MiniMax-M3.1-Flash DSpark context KV projection (TP4) through
gemm_a8w8_blockscale_bpreshuffle->get_mxscale_bpreshuffle_config.The diff only adds rows, and the lookup matches on (N, K, M, w_scale), so rows for other shapes are untouched.
The existing table has 18 (N, K) pairs and none has N=1280.