Skip to content

perf(cuda): lfm2-350m-8bit decode regressed ~10x on GB10 (409 -> ~40 tok/s) between 0.3.1 and 0.4.0-rc.1 #748

Closed

Description

@inureyes

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 pin 57c66cac (0.32.1)
  • Regression baseline: mlxcel 0.3.1 sweep of 2026-06-17, MLX pin a6ec7123
  • Harness: same-process mlxcel-bench-decode via scripts/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-8bit decode moved only -4% (30.18 -> 28.96) and gemma-4-e2b-it-8bit / gemma-4-e4b-it-8bit are 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:

Acceptance criteria

  • Root cause identified (bisect or kill-switch A/B evidence attached).
  • lfm2-350m-8bit decode 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/ and docs/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

  1. added
    status:ready
    type:bug
    priority:high
    area:inference
    area:benchmark
    on Jul 12, 2026
  2. added
    status:in-progress
    status:review
    and removed
    status:ready
    status:in-progress
    on Jul 12, 2026
  3. added
    status:done
    and removed
    status:review
    on Jul 12, 2026
  4. added a commit that references this issue on Jul 30, 2026
    3fa2789
  5. self-assigned this
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:benchmarkarea:inferencepriority:highstatus:donetype:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions