fix bug of qwen and gguf export#1846
Open
n1ck-guo wants to merge 10 commits into
Open
Conversation
Signed-off-by: n1ck-guo <heng.guo@intel.com>
This was referenced May 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates AutoRound’s GGUF export and quantization pipeline to support additional quantization/export behaviors (notably ModelOpt NVFP4 repacking, optional MoE expert tensor fusion, and some broader model/config handling tweaks), plus a small API-compatibility improvement in the SignRound quantizer.
Changes:
- Add ModelOpt NVFP4 tensor repacking/writing logic and related metadata handling in the HF→GGUF converter.
- Add optional MoE gate/up expert tensor fusion during GGUF tensor emission.
- Improve robustness/compatibility in a few spots (safe checkpoint mapping access, config aliasing, extra tensor filtering, SignRound kwargs passthrough, log message cleanup).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| auto_round/export/export_to_gguf/convert.py | Avoids assuming _checkpoint_conversion_mapping exists on models during tensor enumeration. |
| auto_round/export/export_to_gguf/convert_hf_to_gguf.py | Adds NVFP4 repacking + scale tensor writing, optional expert fusion, and several model/config export tweaks. |
| auto_round/compressors/entry.py | Simplifies one-time mode-selection log messages. |
| auto_round/algorithms/quantization/sign_round/quantizer.py | Allows passing through kwargs (e.g. disable_opt_rtn) when quantizing layers outside blocks. |
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
|
check gguf version>=xxx |
wenhuach21
reviewed
May 25, 2026
wenhuach21
approved these changes
May 25, 2026
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines failed to run 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
This PR updates AutoRound’s GGUF export integration to match the latest llama.cpp converter architecture.
Why
llama.cpp moved model-specific GGUF conversion logic out of convert_hf_to_gguf.py and into the new conversion/ package. AutoRound previously depended on symbols from convert_hf_to_gguf.py, which is now only a CLI wrapper and no longer sufficient for GGUF export.
What Changed
New Behavior
By default, users can continue using GGUF export without extra setup. For newer models not supported by the bundled converter, users can either set LLAMA_CPP_ROOT or enable AUTO_ROUND_GGUF_AUTO_UPDATE=1 to try the latest llama.cpp conversion logic dynamically.
Type of Change
Bug fix
Related Issues
Fixes or relates to #
Checklist Before Submitting
/azp run Unit-Test-CUDA-AutoRound.