Set NVFP4 MSE preset effective bits to 4.5 - #2223
Conversation
Signed-off-by: realAsma <akuriparambi@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe NVFP4 W4A4 MSE FP8-scale preset now declares ChangesNVFP4 storage cost
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change corrects the NVFP4 preset’s effective-bit metadata and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2223 +/- ##
==========================================
- Coverage 78.98% 78.37% -0.61%
==========================================
Files 522 522
Lines 60599 60599
==========================================
- Hits 47862 47497 -365
- Misses 12737 13102 +365
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:
|
What does this PR do?
Type of change: Bug fix
Set
effective_bits: 4.5on the NVFP4 W4A4 weight-MSE FP8-scale-sweep preset. This records the NVFP4 storage cost—including its FP8 scale overhead—at the preset level for AutoQuant consumers.Add a focused regression test to ensure the discovered preset continues to expose the correct effective-bit cost.
Usage
No new API or flag is introduced. Recipes importing
nvfp4_w4a4_weight_mse_fp8_sweepautomatically receive the corrected metadata.Testing
pre-commit run --files modelopt_recipes/configs/ptq/presets/model/nvfp4_w4a4_weight_mse_fp8_sweep.yaml tests/unit/recipe/test_presets.pypytest_pwd -q tests/unit/recipe/test_presets.py— 7 passedgit diff --check 913f5e224cb2a9a7754bd2f17edd50395aad7bf7..5be3e216e57822394f2f6db842f759489c72e2fbBefore your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: N/AAdditional Information
None.
Summary by CodeRabbit
New Features
Bug Fixes
Tests