Skip to content

[MLX] Pin the MLX v0.32.5 release and drop the merged qmv_mma patch - #4591

Open
XXXXRT666 wants to merge 2 commits into
mainfrom
mlx-pin-update
Open

XXXXRT666 wants to merge 2 commits into
mainfrom
mlx-pin-update

Conversation

@XXXXRT666

@XXXXRT666 XXXXRT666 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

MLX has released v0.32.5 (2026-11-25), the first release with ml-explore/mlx#4791 (the 4D gates of gated_delta_update that Ming3 needs), so the runtime no longer has to build from a main commit. One of the two patches we carry, ml-explore/mlx#4860, is in the release and can go; the other, ml-explore/mlx#4852, is still open upstream.

Modifications

Pin: fc344c986c (main, 2026-11-06) → the v0.32.5 release, commit cfc675e9e5.

Patches in scripts/mlx-patches/:

Patch State upstream Here
ml-explore/mlx#4860 (2/3/5/6-bit affine qmv_mma) merged on 2026-11-21 and in v0.32.5; the added and removed lines of our patch are the same as upstream's deleted
ml-explore/mlx#4852 (reuse in-flight Metal buffers) open; its branch was rebased onto 5598dfa0ae and is mergeable, with the same added and removed lines as our patch kept, rebased; applies to v0.32.5 unchanged

The rebase of ml-explore/mlx#4852 had two conflicts, both with ml-explore/mlx#4885 (allocator statistics under the mutex): a new function in mlx/allocator.h next to the patch's AllocationScope, and the new assert in MetalAllocator::free. The added and removed lines of the patch are unchanged. I kept ml-explore/mlx#4885's assert after the patch's early return, where active_memory_ is updated.

Runtime code: no change. Our sources have no custom Metal kernels and no mlx/backend includes (only mlx/mlx.h and mlx/memory.h), so nothing else depends on the pin. The whole runtime and all five test targets compile against the new one.

Static review of the upstream commits

I read the diffs of the commits that touch the Metal backend, the allocator, the scheduler, eval, compile, the ops and the fast ops. Of the CUDA, CPU kernel, docs, CI and Windows commits I only looked at the title and file list. None of this is measured: the directions below are read from the diffs and from the upstream PRs' own numbers, which are for other machines and other models.

Our shipped build has deployment target macOS 15.0, for which MLX compiles no NAX kernels (Building without NAX kernels in the build log). Everything below that only concerns NAX is therefore not reached by Voxt.

Upstream PR Change Our code path Expected effect
ml-explore/mlx#4860 qmv_mma for 2/3/5/6 bits, and from N * K = 2^20 on gen 15+ quantized matmul with a few rows, such as DFlash's blocks (the 0.6B and 1.7B drafts have a block of 8) already in our build as a patch, so no change
ml-explore/mlx#4890 qmv_mma from 4 rows on M1 and M2 Ultra, which had kept the vector kernels DFlash's blocks and other passes of 4 rows or more should be faster on those two chips; other chips unchanged
ml-explore/mlx#4827 qmv_mma on M3 Ultra and newer for layers with N and K of at least 4096; on NAX from 4 rows for 4-bit Qwen3-ASR 0.6B and 1.7B have no such layer (hidden 1024 and 2048, intermediate 3072 and 6144 in their config.json); I did not check the other models' sizes. NAX is not built none for Qwen3-ASR
ml-explore/mlx#4850 other tiles for x @ W with W stored [in, out] (gemv_t) Checkpoint::Linear and the LSTMs transpose their weights, and Ming3's MoE gate is a transposed view, which check_transpose reports as transposed: I found no path to this kernel none found
ml-explore/mlx#4885 allocator counters under the mutex wait_for_capacity is called for each evaluated array and now locks the allocator mutex to compare active memory while tasks are in flight very small extra cost per array; can also contend with the completion handlers; not measured
ml-explore/mlx#4882 scheduler's task count is an atomic, not behind a mutex every command buffer commit and completion neutral to slightly faster
ml-explore/mlx#4893 fused SDPA for head dim 256 with 512 to 1023 rows, on NAX only NAX is not built (and Qwen3-ASR's head dim is 128) none
ml-explore/mlx#4903, ml-explore/mlx#4956 NAX kernel build fix, NAX availability API NAX not built none
ml-explore/mlx#4915 reshape and view of non-contiguous arrays set the contiguous flag correctness fix (reshape after transpose could reorder values since 0.32.4); I found no reachable input in our code, upstream's trigger is a 3D convolution none expected
ml-explore/mlx#4929 empty outputs handled in many primitives adds checks at the start of eval, such as for convolution, SDPA and quantized matmul none
ml-explore/mlx#4880, ml-explore/mlx#4833, ml-explore/mlx#4861, ml-explore/mlx#4888, ml-explore/mlx#4930, ml-explore/mlx#4908 compile output bookkeeping, JIT template, bool sort, reduce of more than 2^31 elements, quantize allocation, MLX_METAL_RUNTIME_COMPILE switch compiled graphs, steel header, sorts, reductions, weight loading none
ml-explore/mlx#4934, ml-explore/mlx#4927 CUDA attention; their shared fast.cpp changes are the bool mask conversion behind supports_bool_mask(), which is true on Metal, and window_size in the SDPA VJP primitive not reached by Metal inference none
ml-explore/mlx#4910, ml-explore/mlx#4907, ml-explore/mlx#4823, ml-explore/mlx#4818, ml-explore/mlx#4873 SDPA VJP precision, checkpointing and other gradients; ml-explore/mlx#4818 also passes a stream in l2_norm we run no gradients none
the remaining CUDA, CPU, docs, CI and Windows commits not reached on Metal, by title and file list none

Possible regressions to look at:

Minimum macOS does not change.

Related Issues

Follow-up to #4181.

Accuracy Test

Not run. This is a pin update; no test, transcription check or golden comparison was run on any machine. The last accuracy numbers are in #4181, for the old pin.

Benchmark & Profiling

Not run. The table above is a reading of the diffs, not a measurement. The speed-relevant points for a later run are the DFlash verify blocks on Ultra machines and the allocator mutex on the decode loop.

Compiled only, on an M4 Air (macOS 27 SDK, Release):

  • build_runtime.sh from a clean work directory with v0.32.5 and the patch (deployment target 15.0): MLX and the whole runtime build and install.
  • stub_server, audio_chunk_test, ming3_mtp_probe, fishaudio_drama3_experts_test and fishaudio_drama3_codec_test also link.
  • A build with deployment target 26.2, where MLX also compiles the NAX kernels, succeeded at 5598dfa0ae with the same patch; I did not repeat it on v0.32.5, whose two extra commits do not touch the Metal backend (the shipped build does not use NAX).

Checklist

  • Format your code according with pre-commit. (The .patch files are excluded from pre-commit, so nothing else needed formatting.)
  • Add unit tests.
  • Update documentation / docstrings / example tutorials as needed.
  • Provide throughput / latency benchmark results and accuracy evaluation results as needed. (Not run, see above.)

MLX-only change: Mac CI needs the run-mac-ci label. The first run has no cached MLX build and compiles MLX first.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings November 24, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@XXXXRT666 XXXXRT666 added the run-mac-ci Run Mac CI after lint: SGLang Omni MLX runtime and Voxt helper tests; no H100 unit tests label Nov 24, 2026
Copilot AI balanced review requested due to automatic review settings November 28, 2026 01:46
@XXXXRT666 XXXXRT666 changed the title [MLX] Update the pinned MLX commit and drop the merged qmv_mma patch [MLX] Pin the MLX v0.32.5 release and drop the merged qmv_mma patch Nov 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-mac-ci Run Mac CI after lint: SGLang Omni MLX runtime and Voxt helper tests; no H100 unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants