Skip to content

[M3 Ultra] Metal: 13% throughput regression in token generation (tg128) vs March 2026 builds #21494

Description

@jecruz

Bug Description

M3 Ultra (Apple Silicon, 96GB unified memory) shows significant token generation throughput regression in recent Metal backend builds compared to March 2026 builds.

Hardware

  • Apple M3 Ultra
  • 96GB unified memory
  • macOS (Metal backend)

Model

Qwen3.5-35B-A3B-Q8_0 (34.36 GiB GGUF)

Expected Behavior

Token generation (tg128) should achieve ~85 t/s as seen in March 28, 2026 builds.

Actual Behavior

Token generation (tg128) is limited to ~73-74 t/s — a 13% regression.

Benchmark Data

Test March 28 (build 178) Current (build 8860) Regression
f16 tg128 85.48 t/s 73.43 t/s -13%
f16 pp512 ~1807 t/s 1808 t/s -1%
f16 pp128+tg128 ~137 t/s 137.61 t/s +1%
f16 pp8192 ~2106 t/s 1183 t/s -44%
turbo3 tg128 78.47 t/s 63.23 t/s -19%

Note: pp8192 shows a severe 44% regression, suggesting the issue may be related to larger batch/prefill sizes.

Root Cause Investigation

  • Same model, same hardware confirmed
  • Pre-merge vs post-merge shows same regression (not from any fork-specific changes)
  • Upstream base (build 8401, ggml 0.9.7) also shows regression
  • Reverting N_FORWARD from 64→8 makes it worse (69.92 t/s), so concurrency changes are not the cause

Suspected Commits (not bisected)

These Metal kernel commits landed between build 178 and current:

  1. b54124110 — metal: fix q5_k mul_mv register spill (metal : fix q5_k mul_mv register spill #20399)
  2. e22cd0aa1 — metal: extend mul_mv_ext to BF16, Q2_K, Q3_K (metal : extend mul_mv_ext to BF16, Q2_K, Q3_K #20250)
  3. 1725e316c — models: optimize qwen3next graph (models : optimizing qwen3next graph #19375)

The pp8192 regression (-44%) suggests the issue may be in graph construction or large batch handling.

Test Command

./build/bin/llama-bench \
  -m model.gguf \
  -ctk f16 -ctv f16 \
  -pg 128,128 -pg 8192,128 \
  -t 1 -r 3 -o md

Tags

  • performance
  • hardware
  • macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions