feat: Add deepseek flops tracker (original #1250)#1305
Conversation
Signed-off-by: Guyue Huang <guyueh@nvidia.com>
Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com>
Signed-off-by: Guyue Huang <guyueh@nvidia.com>
📝 WalkthroughWalkthroughAdds DeepSeek-V3 support to FLOPS config conversion by introducing a new model_type branch in nemo_rl/utils/flops_tracker.py and importing the deepseekv3 FLOPS formula. Updates unit tests to include a DeepSeek-V3 test case with expected FLOPS. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Trainer as Trainer/Caller
participant Tracker as FLOPSTracker
participant Conv as convert_config_to_flops_config
participant Formula as FLOPS Formula
User->>Trainer: Configure model (DeepSeek-V3) and run
Trainer->>Tracker: init/start tracking
Tracker->>Conv: convert(config)
alt model_type == "deepseek_v3"
Conv->>Conv: Build FLOPSConfig (DeepSeek-V3 fields)
Conv-->>Tracker: (FLOPSConfig, deepseekv3)
Tracker->>Formula: compute(FLOPSConfig) [deepseekv3]
else other model types
Conv-->>Tracker: (FLOPSConfig, corresponding formula)
Tracker->>Formula: compute(FLOPSConfig)
end
Formula-->>Tracker: FLOPS value
Tracker-->>Trainer: Report FLOPS
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.py📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
nemo_rl/**/*.py📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Files:
🧬 Code graph analysis (1)nemo_rl/utils/flops_tracker.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…NeMo#1305) Signed-off-by: Guyue Huang <guyueh@nvidia.com> Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com>
…NeMo#1305) Signed-off-by: Guyue Huang <guyueh@nvidia.com> Signed-off-by: Guyue Huang <140554423+guyueh1@users.noreply.github.com> Signed-off-by: yuanhangs <yuanhangs@nvidia.com>
What does this PR do ?
This is a replica of #1250 in the main repo for CI testing.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information
Summary by CodeRabbit
New Features
Tests