Repository navigation
Speed up QQQ processor quantization with MLX - #3231
Merged
Merged
Conversation
Qubitium
force-pushed
the
feature/mlx-qqq-processor-quant
branch
from
September 27, 2026 09:26
476a08c to
116b753
Compare
Qubitium
force-pushed
the
feature/mlx-qqq-processor-quant
branch
from
September 27, 2026 10:28
b523509 to
c6380d5
Compare
Qubitium
force-pushed
the
feature/mlx-qqq-processor-quant
branch
from
September 27, 2026 10:30
c6380d5 to
b4b38ef
Compare
Qubitium
marked this pull request as ready for review
September 27, 2026 10:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Connect the existing native MLX QQQ weight-quantization kernel to the standard QQQ processor on Apple silicon. Eligible 4-bit symmetric QQQ layers now run the Hessian-compensated quantization stage through MLX, while unsupported and small configurations retain the existing Torch path.
This is one focused QQQ quantization-stage PR. It does not change another quantization method or QQQ inference arithmetic.
What Changed
-1or128, block size 128, dynamic groups, no MSE) through the native MLX kernel above a measured crossover threshold.Accuracy and Performance
Apple M5 Ultra, resident processor inputs, Torch↔MLX transfers included, 10 warmups, alternating execution order, 301 measured samples per path and row. Torch is the existing processor arithmetic; MLX is the changed path.
All 36 Qwen3.8-27B projection/dtype/group cases pass. Changed codes are independently adjudicated direct rounding ties or immediate one-step error-feedback descendants. Maximum drift away from changed codes is
1.1920929e-7; maximum scale drift is1.49011612e-8; extra-scale drift is exactly0. “Loss drift” is absolute drift in the aggregate diagnostic sum over the entire matrix, not per-value quantization drift.Median speedup: 8.188x. Minimum: 2.346x. Maximum: 9.027x.
Tests
Review Requirements
I or an AI agent (such as Codex or Claude) have: