[regression] qkv_scale is empty due to offload in autoscheme.#1580
Closed
[regression] qkv_scale is empty due to offload in autoscheme.#1580
Conversation
Signed-off-by: Xin He <xin3.he@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a regression where KV-cache scale parameters (e.g., k_scale/v_scale) can end up empty/zero when AutoScheme runs with offloading enabled, by adjusting how parameters are updated and adding a targeted CPU regression test.
Changes:
- Adds a CPU regression test covering AutoScheme +
static_kv_dtype="fp8"to ensurek_scale/v_scaleare populated. - Updates
update_parameter_datato handle cases where a parameter was cleared to an empty tensor (e.g., via offload) by recreating the parameter when shapes differ.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| test/test_cpu/schemes/test_auto_scheme.py | Adds a regression test intended to detect missing/zero KV scales after quantize_and_save. |
| auto_round/experimental/utils.py | Modifies parameter update logic to try to recover when a parameter tensor has been cleared/shape-changed due to offload. |
yiliu30
approved these changes
Mar 20, 2026
Contributor
|
Still got the issue, #1573 |
Contributor
|
Use #1583 instead. |
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
Please briefly describe your main changes, the motivation.
Type of Change
Related Issues
Fixes or relates to #1573, #1574
Checklist Before Submitting