Merged
Conversation
Signed-off-by: n1ck-guo <heng.guo@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds validation of scheme arguments when exporting models to different quantization formats. Previously, the format function only validated string schemes and didn't check for incompatibilities between the scheme object's properties (bits, data_type, etc.) and the target format's requirements.
Changes:
- Added
check_scheme_args()method to validate QuantizationScheme objects against format-specific constraints - Implemented validation for LLMCompressor, AutoGPTQ, AutoAWQ, and VLLM formats
- Removed unsupported w8a8 test case for llmcompressor format
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| auto_round/formats.py | Added check_scheme_args() methods to OutputFormat classes to validate scheme parameters against format requirements |
| test/test_cpu/export/test_export.py | Added test cases to verify scheme validation raises appropriate errors for incompatible configurations |
| test/test_cpu/integrations/test_llmcompressor.py | Commented out w8a8 test case as this scheme is not supported by llmcompressor format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wenhuach21
reviewed
Jan 23, 2026
wenhuach21
reviewed
Jan 23, 2026
wenhuach21
approved these changes
Jan 23, 2026
lvliang-intel
pushed a commit
that referenced
this pull request
Feb 2, 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
In the previous code, the format function only handles cases where the scheme is a string. It does not perform checks for scenarios like --scheme w2a16 --bits 4. This PR adds the relevant checks.
Type of Change
Related Issues
Fixes or relates to #1247
Checklist Before Submitting