nemo-mbridge-perf-activation-recompute

Configure selective and full activation recompute to reduce GPU memory usage in Megatron Bridge training.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/sayalinvidia/sayali-skills-test --skill nemo-mbridge-perf-activation-recompute
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nemo-mbridge-perf-activation-recompute
Source: https://github.com/sayalinvidia/sayali-skills-test/tree/main/skills/nemo-mbridge-perf-activation-recompute
Command: npx skills add https://github.com/sayalinvidia/sayali-skills-test --skill nemo-mbridge-perf-activation-recompute

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Activation recompute trades GPU memory for compute by discarding intermediate activations during the forward pass and recomputing them during backward in Megatron Bridge, enabling training under tighter memory budgets.

Core Features & Use Cases

  • Supports selective recompute to save memory by recomputing specific submodules (e.g., core_attn, layernorm) with moderate compute cost.
  • Supports full-layer recompute to maximize memory savings when memory pressure is extreme, with guidance on when to apply.
  • Provides compatibility guidance for TE-scoped CUDA graphs and related constraints during memory tuning for large models.

Quick Start

Configure selective recompute first (e.g., core_attn; optionally add layernorm), then escalate to full recompute with recompute_num_layers and recompute_method if memory pressure persists.

Frequently Asked Questions about nemo-mbridge-perf-activation-recompute

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce GPU memory usage during Megatron Bridge training?

Reduce GPU memory usage by configuring selective and full activation recompute in Megatron Bridge. Discard intermediate activations during the forward pass and recompute them during backward to enable training under tighter memory budgets.

What is the best way to configure selective activation recompute for Llama3-70b?

Configure selective activation recompute first by targeting specific submodules like core_attn and optionally adding layernorm. This saves memory with moderate compute cost, keeping TE-scoped CUDA graphs in mind for Llama3-70b compatibility.

When should I escalate from selective recompute to full recompute?

Escalate to full recompute when memory pressure persists after applying selective recompute. Use recompute_num_layers and recompute_method to maximize memory savings when memory pressure is extreme.

What are the limitations of TE-scoped CUDA graphs when toggling full recompute?

TE-scoped CUDA graphs have specific compatibility constraints when toggling to full recompute. Ensure selective recompute has a non-empty recompute_modules list and apply these compatibility limitations during memory tuning for large models.

Does activation recompute trade compute for memory in Transformer training?

Activation recompute trades GPU memory for compute by discarding intermediate activations during the forward pass and recomputing them during backward, enabling training under tighter memory budgets for large Transformer models.

Why does my recompute_modules list need to be non-empty for selective recompute?

Selective recompute requires a non-empty recompute_modules list to specify which submodules to recompute. Without specifying target modules like core_attn or layernorm, the selective recompute mechanism cannot apply memory savings.