diff --git a/changelog.d/mlx-upstream-2026-10-30.md b/changelog.d/mlx-upstream-2026-10-30.md new file mode 100644 index 0000000000..ec9671f6cd --- /dev/null +++ b/changelog.d/mlx-upstream-2026-10-30.md @@ -0,0 +1,8 @@ +### MLX core updated to upstream MLX main (2026-10-30) + +The provider and cluster worker now build on upstream MLX main `1ba7f969`, merged into the Layr-Labs MLX fork. + +- `libs/mlx` and the copy nested in `libs/mlx-swift` that Cmlx compiles move from `72dffa2d` to `47c5eb0e`. `libs/mlx-swift` moves from `c633d221` to `86718def` (nested mlx-c `2ac897e3` to `ba493a03`), and `libs/mlx-swift-lm` stays at `67110e7b`. +- Release builds compile MLX with `NDEBUG`, so they no longer run its asserts or Metal shader logging, nor the graph check on every dispatch and the allocation tracking that upstream added in this update, which cost about 10% of decode speed when left on. +- From upstream, a stalled JACCL collective checks its Thunderbolt RDMA queue pair about every 100 ms and fails once the queue pair is in an error state. +- On two M5 Ultra serving Qwen3.8 27B and GLM-5.3-Flash tensor-parallel, decode speed is unchanged within run-to-run noise, the answers to 12 fixed greedy prompts per model are byte-identical to the previous build's, and concurrent requests still decode the same tokens as alone. diff --git a/docs/architecture/inference.md b/docs/architecture/inference.md index 5ebf377c27..85fad78575 100644 --- a/docs/architecture/inference.md +++ b/docs/architecture/inference.md @@ -4665,6 +4665,19 @@ row count. One row still takes qmv, whose bits differ from qmv_wide's, so a path that must equal a single row keeps it in a launch of single rows, as before. Single-Mac serving leaves the switch off and keeps MLX main's kernels. +Attention needs no switch, but it has its own condition. Since the 2026-10-30 +core (upstream MLX main `1ba7f969`), MLX runs an attention call on `sdpa_split` +(upstream #4723) when it has up to eight query tokens, 33 to 128 rows per KV +head (tokens times query heads per KV head), at least 128 keys and no array +mask or sinks (`has_fused_kernel` and `use_split` in +`libs/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/scaled_dot_product_attention.cpp` +hold the full condition). `sdpa_split` picks its number of key blocks, and so +its rounding, from the batch size. The cluster's +`MLXFast.scaledDotProductAttention` calls carry one sequence each (one row's +prompt chunk, verify window or decode column), so a row's attention bits do not +depend on its batchmates. A change that stacks several sequences into one call +has to keep that property. + The arithmetic is one per process, resolved at start from the GPU family and the weight's packing only, never from timing: its form (MLX qmv's scaled inputs, or dequantized weights, each weight `s * q + b` rounded once and then one fused diff --git a/libs/mlx b/libs/mlx index 72dffa2dbb..47c5eb0ebc 160000 --- a/libs/mlx +++ b/libs/mlx @@ -1 +1 @@ -Subproject commit 72dffa2dbbdce95601fd84f5e8b6d7b4ec97a11b +Subproject commit 47c5eb0ebc674d32a7ae2fc1dd7710e76315a049 diff --git a/libs/mlx-swift b/libs/mlx-swift index c633d221d6..86718def96 160000 --- a/libs/mlx-swift +++ b/libs/mlx-swift @@ -1 +1 @@ -Subproject commit c633d221d627898502046714dcca677d9374a1ab +Subproject commit 86718def965557f81f9cbf120e567472956922b5