fix autoscheme accuracy drop bug w/o low_gpu, add CI test#1658
Open
WeiweiZhang1 wants to merge 3 commits intomainfrom
Open
fix autoscheme accuracy drop bug w/o low_gpu, add CI test#1658WeiweiZhang1 wants to merge 3 commits intomainfrom
WeiweiZhang1 wants to merge 3 commits intomainfrom
Conversation
Signed-off-by: WeiweiZhang1 <weiwei1.zhang@intel.com>
for more information, see https://pre-commit.ci
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an AutoScheme scoring regression that causes accuracy degradation when running with low_gpu_mem_usage=False, and adds a CUDA test intended to prevent the regression from reoccurring.
Changes:
- Enable gradient-based scoring (
grad_mode=True) for AutoScheme wrapper layers in the non-low_gpu_mem_usagescoring path. - Add a CUDA regression test comparing accuracy between
low_gpu_mem_usage=TrueandFalsefor mixed-bit AutoScheme. - Add a CLI warning about potential issues using
--enable_torch_compilewith AutoScheme.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
auto_round/auto_scheme/delta_loss.py |
Restores gradient-driven scoring behavior when low_gpu_mem_usage=False by enabling wrapper grad_mode. |
test/test_cuda/algorithms/test_auto_scheme.py |
Adds a regression test to compare accuracy parity across low_gpu_mem_usage modes. |
auto_round/__main__.py |
Warns users about potential torch.compile issues when using AutoScheme. |
Contributor
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
wenhuach21
reviewed
Apr 3, 2026
| **common_kwargs, | ||
| ) | ||
| model_baseline, _ = ar_baseline.quantize() | ||
| acc_baseline = evaluate_accuracy(model_baseline, ar_baseline.tokenizer, task="piqa", limit=200) |
Contributor
There was a problem hiding this comment.
This unit test is not robust if we introduce bugs that affect both cases. It’s better to use a reference float value and verify both results against it, ensuring that the accuracy meets or exceeds this threshold.
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
bugfix for:
#1654
Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting