Repository navigation
Remove INT8 per-channel re-encoding from MatMulNBitsToQDQ - #2772
Merged
Jambay Kinley (jambayk) merged 2 commits intoOct 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change removing optional INT8 re-encoding while retaining weight-preserving conversion.
No open issues 🎉
What changed in this PR
This PR removes optional INT8 per-channel re-encoding from Olive’s MatMulNBitsToQDQ pass, retaining conversion that preserves the original quantized weights.
Changes:
- Removes the
use_int8_per_channeloption and its re-encoding helper. - Leaves nodes with floating-point zero points unchanged and logs a warning.
- Replaces re-encoding tests with regression coverage for weight preservation and floating-point zero-point handling.
| File | Description |
|---|---|
test/passes/onnx/test_mnb_to_qdq.py |
Tests blockwise and per-channel weight preservation, plus skipping unsupported zero points. |
olive/passes/onnx/mnb_to_qdq.py |
Removes INT8 re-encoding and guards against floating-point zero-point conversion. |
Review effort: Balanced
Jambay Kinley (jambayk)
previously approved these changes
Oct 27, 2026
Jambay Kinley (jambayk)
approved these changes
Oct 27, 2026
Jambay Kinley (jambayk)
deleted the
nbudnarain/preserve-matmulnbits-int4
branch
October 28, 2026 02:54
Jambay Kinley (jambayk)
pushed a commit
that referenced
this pull request
Oct 30, 2026
## Describe your changes Add optional MatMulNBits activation-computation accuracy overrides to Olive's Mobius export path. - Reuse the existing `--int4_accuracy_level` capture CLI option for both Model Builder and Mobius, moving it outside the Model Builder-only argument group. - Forward the shared CLI option to MobiusBuilder's `matmul_nbits_accuracy_level` setting. - Accept integer values 0–4. Omitted/null pass settings preserve Mobius defaults; explicit 0 is forwarded. - Apply the Mobius override regardless of MatMulNBits weight bit width, including 8-bit operators. Weight quantization and GatherBlockQuantized are unchanged. - Add validation and regression tests for defaults, explicit values, invalid inputs, and exporter selection. This PR contains accuracy-override changes only. Post-export LM-head reblocking has been removed; the recipe now configures the LM head's group size during quantization. INT4-preserving QDQ conversion changes remain separate in #2772. ### Validation - 97 focused Olive CLI/MobiusBuilder tests passed. - 3 recipe integration tests passed. - Fresh Gemma 4 E2B recipe preparation completed: quantization, Mobius capture, QNN compilation, and weight-preservation audits. - Laptop text and image QNN HTP smoke tests passed with vision enabled and no model overrides. The fresh E2E run used per-channel INT4 decoder quantization with an 8-bit/group128 LM-head override. These are functional smoke tests, not repeated benchmarks or a comprehensive model-quality evaluation. ### Release note Mobius capture now supports the shared `--int4_accuracy_level` option, including overrides for 8-bit MatMulNBits operators despite the option's historical name. --------- Signed-off-by: neilmsft <neilmsft@hotmail.com>
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.
Removes the optional use_int8_per_channel re-encoding path from
MatMulNBitsToQDQ, retaining conversion that preserves the original
quantized weights instead of requantizing them to INT8.
Includes regression coverage for blockwise and per-channel weight
preservation, plus a guard that leaves nodes with unsupported
floating-point zero points unchanged.