Point mlx at Qwen3.6 decode matvec optimizations (~30 tok/s) - #63
Conversation
Updates mlx to cursor/qwen36-decode-opt-088d (~30.4 tok/s decode on Qwen3.6-35B-A3B-8bit with prefill held near 683 tok/s).
Addresses Codex review on goniz/mlx#65; decode still ~30.4 tok/s.
Keeps Qwen3.6-35B-A3B-8bit around 684 prefill / 31 decode after addressing Codex P1 on deferred submit memory visibility.
Updates to merge commit df10f7b8f (goniz/mlx#65 Qwen3.6 decode opts).
There was a problem hiding this comment.
💡 Codex Review
https://github.com/goniz/mlx-vulkan/blob/0aa7b9754ca1ee1c128fd8e471948b28160ecfda/mlx/mlx/backend/vulkan/kernels/mul_mv_affine8.comp#L82
Keep affine8 weight offsets byte-accurate
When an 8-bit affine weight row is not 4-byte aligned, such as a quantized layer with K/packed_row_bytes not divisible by 4, this floors the byte offset before indexing the new uint view. For col > 0 the row can start in the middle of a word, but both the packed fast path and the scalar fallback then read byte 0 of the floored word as k=0, mixing bytes from the previous row/column and producing incorrect matvec results; keep byte indexing or account for the intra-word byte offset.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex P2 (affine8 weight offsets) — no code change
The same applies to gather ( Happy to add an assert in the C++ dispatcher if we want a belt-and-suspenders check, but the shader flooring is safe under the current packing contract. |
Summary
Updates the
mlxsubmodule to the mergedfeat/vulkantip from goniz/mlx#65:df10f7b8f— Merge pull request #65 from goniz/cursor/qwen36-decode-opt-088dVulkan decode optimizations for MoE gather matvec + safer deferred barriers (subgroup partial sizing + submit-tail barrier included).
Benchmarks (
mlx-community/Qwen3.6-35B-A3B-8bit)Merged MLX PR: goniz/mlx#65