gguf format add support for mtp quantization - #1866
Merged
Merged
Conversation
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds centralized GGUF dtype-selection logic to support llama.cpp-style mixed quantization rules (including MTP/NextN layers), and wires it into both GGUF export and compressor layer-config generation.
Changes:
- Introduces
GGUFDTypeSelector/ GGUF-format mapping utilities to select per-tensor GGML quantization types compatible with llama.cpp mixed modes. - Updates GGUF export (
convert.py) and compressor GGUF config generation (compressors/utils.py) to use the shared dtype selector instead of duplicated rule logic. - Adds CPU unit tests validating MTP-related dtype selection behavior for key tensor categories.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
test/test_cpu/export/test_gguf_mtp_dtype.py |
Adds unit tests covering MTP layer dtype selection and selector counters. |
auto_round/export/export_to_gguf/gguf_dtype.py |
New shared GGUF dtype selector + GGUF-format helpers. |
auto_round/export/export_to_gguf/convert.py |
Uses the shared selector when no explicit per-layer override is provided. |
auto_round/compressors/utils.py |
Replaces inlined mixed-quant selection rules with shared selector output. |
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
n1ck-guo
force-pushed
the
hengguo/gguf_mtp
branch
from
May 29, 2026 08:45
a46b921 to
d36349f
Compare
for more information, see https://pre-commit.ci
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
n1ck-guo
added a commit
that referenced
this pull request
Jun 13, 2026
Signed-off-by: n1ck-guo <heng.guo@intel.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.
Description
Please briefly describe your main changes, the motivation.
Type of Change
New feature
Related Issues
Fixes or relates to #
Checklist Before Submitting
/azp run Unit-Test-CUDA-AutoRound.