-
Notifications
You must be signed in to change notification settings - Fork 283
support tuning target_bits #2336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: He, Xin3 <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨ |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for tuning target_bits in the AutoRound quantization configuration, enabling automatic mixed-precision model generation and autotuning of target bits based on evaluation results.
Key changes:
- Added new
target_bitsparameter and auto scheme configuration options toAutoRoundConfig - Implemented preprocessing of model and quantization config in the autotune function to handle tokenizer attributes
- Updated parameter handling in
base_config.pyto use type annotations instead of default values
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| config.py | Added target_bits and related auto scheme parameters to AutoRoundConfig for mixed-precision support |
| autotune.py | Introduced preprocessing function to handle tokenizer attributes before quantization |
| base_config.py | Modified parameter expansion logic to use type annotations |
| tuning_param.py | Moved model creation inside try-catch block for better error handling |
| autoround.py | Implemented auto scheme creation when target_bits is set and added statistics dumping |
| algorithm_entry.py | Passed new auto scheme parameters to the quantizer |
| test_autoround.py | Added tests for target_bits functionality and moved imports to module level |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yiliu30
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
User description
Type of Change
Feature
Description
Feature: support AutoRound target_bits and autotune bits.
Expected Behavior & Potential Risk
How has this PR been tested?
UT pass
Dependency Change?
AutoRound >= 0.9.0
PR Type
Enhancement
Description
Add support for tuning
target_bitsIntroduce new parameters for auto scheme configuration
Update preprocessing in autotune function
Diagram Walkthrough
File Walkthrough
3 files
Add target_bits and auto scheme parametersPreprocess model and quant configUpdate parameter handling4 files