Make group-boundary AutoQuant scoring the default#1988
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1988 +/- ##
==========================================
+ Coverage 75.81% 75.83% +0.02%
==========================================
Files 518 518
Lines 58574 58737 +163
==========================================
+ Hits 44406 44544 +138
- Misses 14168 14193 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Score gradient perturbations at parent attention and MLP outputs by default, with an explicit local-boundary opt-out and local-only KL-divergence behavior. Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com>
82b7171 to
3fcb35f
Compare
Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com>
Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com>
What does this PR do?
Type of change: New feature
AutoQuant gradient scoring currently measures attention projections at their leaf outputs. That can understate perturbations amplified by the surrounding attention computation. Expert projections already use their parent MLP/mixer output as the scoring boundary.
This PR:
self_attn.qkv_proj,self_attention.linear_qkv/linear_proj, andlinear_attn.*;ModuleList/ModuleDictattention containers to the callable child on the projection path, avoiding hooks on uncalled containers;score_boundary: local;use_cache=False;This branch intentionally contains only group-boundary scoring. Per-element score normalization remains a separate change.
Usage
Gradient AutoQuant recipes use group-boundary scoring by default:
To restore leaf-output attention scoring:
KL-divergence remains local because its threshold search does not support parent/group-boundary scoring.
Testing
test_autoquant.py,test_loader.py, andtest_hf_ptq_args.py.ModuleList;state/cachereplay inputs;use_cache=Falseacceptance anduse_cache=Truerejection;266316764abbf4bf940036845a19abeac1e6ae0c7b927b9general/auto_quantize/nvfp4_fp8_at_5p4bitsscore_boundary; the saved state records the resolved value asgroupCOMPLETED, exit0:0Before your PR is "Ready for review"
score_boundary: localrestores the previous behavior.CONTRIBUTING.md: N/AAdditional Information
The scoring boundary is distinct from module grouping: this PR changes where sensitivity is measured, not which modules share one AutoQuant assignment.