Repository navigation
[skills] chore: rename overlap and recompute skills with nemo mbridge prefix #4031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
cdb9c50
d99e20b
91d8675
c240830
6fe590a
1921fa5
11c4ef8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,13 +1,14 @@ | ||||||
| --- | ||||||
| name: perf-activation-recompute | ||||||
| name: nemo-mbridge-perf-activation-recompute | ||||||
| description: Validate and use selective and full activation recompute in Megatron Bridge to reduce GPU memory usage at the cost of extra compute. | ||||||
| license: Apache-2.0 | ||||||
| when_to_use: Reducing GPU memory via activation recompute, or investigating a commit that changed recompute settings and caused OOM or a regression; 'recompute_granularity', 'recompute_num_layers', 'recompute_modules', 'recompute_method', 'selective recompute', 'full recompute', 'activation memory OOM'. | ||||||
| --- | ||||||
|
|
||||||
| # Activation Recompute | ||||||
|
|
||||||
| Stable docs: @docs/training/activation-recomputation.md | ||||||
| Card: @skills/perf-activation-recompute/card.yaml | ||||||
| Card: @skills/nemo-mbridge-perf-activation-recompute/card.yaml | ||||||
|
|
||||||
| ## What It Is | ||||||
|
|
||||||
|
|
@@ -28,7 +29,7 @@ how many layers via `recompute_num_layers`. | |||||
|
|
||||||
| 1. **Set `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True` first** — most | ||||||
| borderline OOMs are caused by memory fragmentation, not capacity. This | ||||||
| fixes it at zero cost. See @skills/perf-memory-tuning/SKILL.md. | ||||||
| fixes it at zero cost. See @skills/mbridge-perf-memory-tuning/SKILL.md. | ||||||
| 2. Start with `recompute_granularity=selective`, `recompute_modules=[core_attn]` | ||||||
| (often already the default in recipes). | ||||||
| 3. Add `layernorm` to recompute modules — nearly free compute-wise but saves | ||||||
|
|
@@ -128,7 +129,7 @@ Key takeaways: | |||||
| (hidden=28672) is expensive to recompute | ||||||
| - Combining `mlp` + `core_attn` is slightly worse than `mlp` alone | ||||||
| - For this workload, the actual OOM fix was `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True` | ||||||
| (memory fragmentation, not capacity). See @skills/perf-memory-tuning/SKILL.md. | ||||||
| (memory fragmentation, not capacity). See @skills/mbridge-perf-memory-tuning/SKILL.md. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same broken reference —
Suggested change
|
||||||
|
|
||||||
| ## Code Anchors | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -92,7 +92,7 @@ recommended_path: | |||||
| first_try: "recompute_granularity=selective, recompute_modules=[core_attn]" | ||||||
| if_still_oom: "add layernorm (cheap) or mlp (expensive but saves ~3 GB)" | ||||||
| last_resort: "recompute_granularity=full, recompute_method=uniform" | ||||||
| alternative: "see skills/perf-memory-tuning/ for VPP tuning and other memory strategies" | ||||||
| alternative: "see skills/mbridge-perf-memory-tuning/ for VPP tuning and other memory strategies" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same issue —
Suggested change
|
||||||
| expected_metric_change: | ||||||
| - metric: peak_memory | ||||||
| direction: down | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: This references
@skills/mbridge-perf-memory-tuning/SKILL.md, but the actual directory is stillskills/perf-memory-tuning/. This name was not renamed in this PR (andmbridge-perf-memory-tuningdoesn't match thenemo-mbridge-*prefix pattern used elsewhere in this PR either). This is a broken cross-reference.