Repository navigation
Description
Summary
During the 2026-07-12 full GB10 benchmark sweep at mlxcel 0.4.0-rc.1, lfm2-350m-8bit decode throughput measured 39.84 tok/s versus the 409.01 tok/s recorded on the 2026-06-17 sweep at 0.3.1. A standalone re-run on the same day reproduced it at 42.47 tok/s, so this is not sweep noise. Prefill is unaffected. This is the only large decode regression in the 159-directory sweep.
Environment
- NVIDIA GB10 (DGX Spark), 122 GB unified LPDDR5x, Linux aarch64 kernel 6.17
- CUDA 13.0, SM 12.1, build:
cargo build --release --features cuda - mlxcel 0.4.0-rc.1 (main at
58d0cbb, benchmarked binary built from that tree), MLX pin57c66cac(0.32.1) - Regression baseline: mlxcel 0.3.1 sweep of 2026-06-17, MLX pin
a6ec7123 - Harness: same-process
mlxcel-bench-decodeviascripts/bench_decode.sh(warmup 20 tokens then measured pass, single process)
Measurements
| run | date | mlxcel | prefill tok/s | decode tok/s | generated tokens |
|---|---|---|---|---|---|
| 0.3.1 sweep | 2026-06-17 | 0.3.1 | 2768.23 | 409.01 | 13 (early EOS) |
| 0.4.0-rc.1 sweep | 2026-07-12 | 0.4.0-rc.1 | 3031.35 | 39.84 | 13 (early EOS) |
| standalone re-run | 2026-07-12 | 0.4.0-rc.1 | 3313.54 | 42.47 | 13 (early EOS) |
Note: both eras generate the same 13 tokens before EOS, so the delta is not a token-count artifact; per-token decode latency went from roughly 2.4 ms to roughly 25 ms. Evidence CSVs are committed on main in benchmarks/cuda_gb10_2026-07-12.csv and benchmarks/cuda_gb10_2026-07-12_single_lfm2-350m-8bit.csv (commit e45ef02); the 0.3.1 baseline row is in benchmarks/cuda_gb10_2026-06-17.csv.
Scope signals (controls from the same sweep)
lfm2-8b-a1b-4bit(same LFM2 conv/attention hybrid family, 4-bit MoE) is healthy: 157.73 -> 161.87 tok/s. So the LFM2 architecture path is not broadly broken.qwen2.5-7b-8bitdecode moved only -4% (30.18 -> 28.96) andgemma-4-e2b-it-8bit/gemma-4-e4b-it-8bitare within noise, so 8-bit quantization is not broadly broken either.- The failing case is specifically the tiny (350M) 8-bit LFM2 checkpoint, which is the most kernel-launch-latency-sensitive combination in the suite (many small layers, short conv mixer blocks, 8-bit qmv at M=1).
Repro
cargo build --release --features cuda
./scripts/bench_decode.sh models/lfm2-350m-8bit --cooldown 0
# reads back benchmarks/cuda_gb10_<date>_single_lfm2-350m-8bit.csv
Candidate windows / suspects
Changes between the 0.3.1 line (2026-06-17, MLX pin a6ec7123) and 0.4.0-rc.1 (MLX pin 57c66cac / 0.32.1) that plausibly touch this path; to be bisected, not assumed:
- The MLX pin bump itself (0.32.x line).
- perf(cuda): single-dtype decode graph to eliminate per-token AsType #732 single-dtype decode graph (per-token AsType elimination): if this model's decode graph fails capture or falls off the CUDA-graph path, every tiny kernel pays launch latency; worth checking whether lfm2-350m-8bit decode is actually running graph-captured.
- perf(cuda/quant): amortize small-M quantized matmul with a multirow qmv path #740 multirow qmv for small-M quantized matmul: A/B with
MLXCEL_QMV_MULTIROW=0to rule the new path in or out. - Hybrid/conv cache handling changes in the 0.4.0 window (the conv mixer state path is unique to LFM2 among the healthy controls).
Acceptance criteria
- Root cause identified (bisect or kill-switch A/B evidence attached).
-
lfm2-350m-8bitdecode on GB10 restored to the 0.3.1 envelope (>= ~350 tok/s), or the regression is documented as an accepted consequence with rationale in the benchmark doc. - The refreshed row lands in
benchmarks/anddocs/benchmark_results/model_tests_gb10.md(which currently carries a "needs an issue" note pointing at this regression; update that note to reference this issue number).
Activity
docs(benchmarks): link the 2026-07-12 GB10 findings to issues #748 and …
fix(lfm2): clarify decode-step gating comment, add bf16 conv guard test
refactor(models): share the short-conv decode helper and audit L=1 co…
fix(cuda): restore lfm2-350m-8bit decode via elementwise short conv (l…
docs(benchmarks): link the 2026-07-12 GB10 findings to issues lablup#748
fix(cuda): restore lfm2-350m-8bit decode via elementwise short conv (l…
refactor(models): share the short-conv decode helper and audit L=1 co…