Repository navigation
Pin Accelerate below 1.14 for llm_qat - #2067
Conversation
Signed-off-by: realAsma <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe LLM QAT example documents an Accelerate regression and requires ChangesLLM QAT dependency constraint
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2067 +/- ##
==========================================
+ Coverage 65.45% 66.95% +1.49%
==========================================
Files 521 521
Lines 59857 59857
==========================================
+ Hits 39181 40077 +896
+ Misses 20676 19780 -896
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:
|
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@examples/llm_qat/requirements.txt`:
- Line 2: Update the accelerate requirement in requirements.txt to include the
lower bound >=1.0.0 while preserving the existing upper bound <1.14, ensuring
standalone installations cannot select Accelerate 0.x.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 94e1d4f9-7dad-4e24-8868-52e63f99a7da
📒 Files selected for processing (1)
examples/llm_qat/requirements.txt
Signed-off-by: realAsma <[email protected]>
|
### What does this PR do? Type of change: Bug fix Pins Accelerate below 1.14 for the `llm_qat` example. Accelerate 1.14 introduced an FSDP2 regression for models whose input embeddings and output head share a parameter; the shared weight can be assigned to two FSDP groups and training fails before the first step. The pin is example-local. The project-wide Hugging Face dependency range and unrelated examples remain unchanged. ### Usage No usage change. Installing the `llm_qat` requirements now resolves Accelerate to the existing supported range below 1.14. ### Testing - Reproduced the duplicate shared-parameter FSDP2 failure with Accelerate 1.14.0 on two ranks. - Verified Accelerate 1.13.0 completes a distillation training step with the otherwise-identical environment and a clean `main` source tree. - Verified the combined requirements resolve to `accelerate>=1.0.0,<1.14` and select 1.13.0. - `pre-commit run --files examples/llm_qat/requirements.txt` - `git diff --check` ### Before your PR is "*Ready for review*" Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md) and your commits are signed (`git commit -s -S`). Make sure you read and follow the [Security Best Practices](https://github.com/NVIDIA/Model-Optimizer/blob/main/SECURITY.md#security-coding-practices-for-contributors). - Is this change backward compatible?: ✅ - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: N/A — dependency-only change validated by an exact two-rank A/B run. - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A - Did you get Claude approval on this PR?: ❌ — draft PR; automated review is pending. ### Additional Information This is a scoped compatibility pin while the upstream Accelerate regression remains unresolved. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Constrained the Accelerate dependency to versions below 1.14 to improve compatibility for the LLM question-answering example. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: realAsma <[email protected]>
### What does this PR do? Type of change: Bug fix Raises the `llm_qat` example's accelerate requirement from `>=1.0.0,<1.14` to `>=1.15.0`. The `<1.14` cap (#2067) existed because accelerate 1.14.0 broke FSDP2 for models with tied input/output embeddings. 1.15.0 fixes that, and it also moves the example off accelerate versions affected by CVE-2026-69112 (path traversal in `load_checkpoint_in_model` / `load_checkpoint_and_dispatch` via unsanitized sharded-index `weight_map` entries). `uv.lock` already resolves accelerate 1.15.0. CI's tiny Qwen3 is untied, so it could not catch the 1.14 regression. The shared NVFP4 PTQ student for the QAT/QAD tests is now built from a tied-embedding tiny Qwen3 (`tied_qwen3_path`), so the existing tests cover it with no extra runs. ### Usage No usage change. ### Testing In `nvcr.io/nvidia/pytorch:26.07-py3` (the llm_qat CI image) on 2 GPUs, installed as CI does, running `pytest tests/examples/llm_qat -k fsdp2`: - accelerate 1.14.0: `test_qwen3_qat_nvfp4[fsdp2]` and `test_qwen3_qad_nvfp4[fsdp2]` **fail** (`ValueError: Parameter 'model.embed_tokens.weight' is shared with a parameter already managed by another FSDP group`). - accelerate 1.15.0: both pass. Not run: the `ddp` / `deepspeed` backends (nightly) and the rest of the llm_qat tests. ### Before your PR is "*Ready for review*" - Is this change backward compatible?: ✅ (example-local requirement bump) - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: ✅ (existing QAT/QAD tests now use a tied-embedding model) - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A - Did you get Claude approval on this PR?: N/A ### Additional Information 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Updated the minimum required Accelerate version. * **Tests** * Expanded validation of quantization-aware workflows with models that use tied word embeddings. The updated checks also confirm that the model fixture remains unchanged during testing. These changes update a package requirement and internal test coverage; no new end-user functionality is noted. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Keval Morabia <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
What does this PR do?
Type of change: Bug fix
Pins Accelerate below 1.14 for the
llm_qatexample. Accelerate 1.14 introduced an FSDP2 regression for models whose input embeddings and output head share a parameter; the shared weight can be assigned to two FSDP groups and training fails before the first step.The pin is example-local. The project-wide Hugging Face dependency range and unrelated examples remain unchanged.
Usage
No usage change. Installing the
llm_qatrequirements now resolves Accelerate to the existing supported range below 1.14.Testing
mainsource tree.accelerate>=1.0.0,<1.14and select 1.13.0.pre-commit run --files examples/llm_qat/requirements.txtgit diff --checkBefore 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.
CONTRIBUTING.md: N/AAdditional Information
This is a scoped compatibility pin while the upstream Accelerate regression remains unresolved.
Summary by CodeRabbit