Skip to content

gguf format add support for mtp quantization - #1866

Merged
n1ck-guo merged 14 commits into
mainfrom
hengguo/gguf_mtp
Jun 3, 2026
Merged

gguf format add support for mtp quantization#1866
n1ck-guo merged 14 commits into
mainfrom
hengguo/gguf_mtp

Conversation

@n1ck-guo

Copy link
Copy Markdown
Contributor

Description

Please briefly describe your main changes, the motivation.

Type of Change

New feature

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.
  • The CUDA CI has passed. You can trigger it by commenting /azp run Unit-Test-CUDA-AutoRound.

Signed-off-by: n1ck-guo <heng.guo@intel.com>
Copilot AI review requested due to automatic review settings May 28, 2026 07:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread auto_round/export/export_to_gguf/gguf_dtype.py
Comment thread auto_round/export/export_to_gguf/gguf_dtype.py
Comment thread auto_round/export/export_to_gguf/convert.py
@chensuyue

Copy link
Copy Markdown
Contributor

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lvliang-intel lvliang-intel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@n1ck-guo
n1ck-guo force-pushed the hengguo/gguf_mtp branch from a46b921 to d36349f Compare May 29, 2026 08:45
n1ck-guo added 2 commits June 2, 2026 13:48
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Signed-off-by: n1ck-guo <heng.guo@intel.com>
@chensuyue chensuyue added this to the 0.13.1 milestone Jun 2, 2026
n1ck-guo added 3 commits June 2, 2026 16:42
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Signed-off-by: n1ck-guo <heng.guo@intel.com>
@chensuyue

Copy link
Copy Markdown
Contributor

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@n1ck-guo
n1ck-guo merged commit f7e77e0 into main Jun 3, 2026
47 checks passed
@n1ck-guo
n1ck-guo deleted the hengguo/gguf_mtp branch June 3, 2026 03:28
n1ck-guo added a commit that referenced this pull request Jun 13, 2026
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants