nemo-mbridge-perf-activation-recompute

nemo-mbridge-perf-activation-recompute is a skill for Claude Code, Codex from NVIDIA-NeMo/Megatron-Bridge. It costs 79 tokens per session (5,018 once invoked), scanned A, a copy of nemo-mbridge-perf-activation-recompute, Apache-2.0.

A guide to activation recompute, also called activation checkpointing, which saves GPU memory by recalculating some intermediate results during backpropagation. It covers selective and full recompute settings in Megatron-Bridge.

In plain words
What is it for?
Reducing training memory use, choosing recompute boundaries, configuring selective or full recompute, and investigating memory regressions.
Why use it?
It helps address GPU memory limits or out-of-memory errors while making the compute-versus-memory trade-off clear. It also helps compare recompute choices with the actual memory pressure of a run.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Reducing training memory use, choosing recompute boundaries, configuring selective or full recompute, and investigating memory regressions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add NVIDIA-NeMo/Megatron-Bridge --skill nemo-mbridge-perf-activation-recompute
Clone the repo
git clone --depth 1 https://github.com/NVIDIA-NeMo/Megatron-Bridge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nemo-mbridge-perf-activation-recompute

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute/github.svg)](https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute)
Your own site
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nemo-mbridge-perf-activation-recompute

Your own site · 80×15
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-activation-recompute.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,018 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.05018
Opus 5.5 $0.00032 $0.02007
Sonnet 5.5 $0.00016 $0.01004
Haiku 4.5 $0.00008 $0.00502

Measured 11d ago against content hash 4a96c38741ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nemo-mbridge-perf-activation-recompute scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

98% identical to nemo-mbridge-perf-activation-recompute — 48 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/nemo-mbridge-perf-activation-recompute/SKILL.md · 290 lines

How it starts

The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Activation Recompute

Stable docs: @docs/training/activation-recomputation.md Card: @skills/nemo-mbridge-perf-activation-recompute/card.yaml

Activation recompute (activation checkpointing) trades additional forward work during backward for lower retained-activation memory. The useful checkpoint boundary depends on the model architecture, attention backend, parallelism, and the tensor that actually drives the per-rank peak.

Quick Decision Guide

  1. Confirm the pressure is real allocation, not allocator fragmentation. Compare max_memory_allocated() with max_memory_reserved() on every rank.
  2. For final library, performance, and verification-card recipes, no recompute and selective recompute on cheap supported modules are both appropriate starting choices. Choose by measured memory headroom and steady-state performance; a no-recompute OOM is not a prerequisite for selective recompute. Keep an explicit no-recompute control when it fits. Under selective granularity, recompute_modules=[] is valid and useful for this comparison.
  3. For selective recompute, start with cheap supported boundaries selected from the architecture and observed peak:
    • Standard attention: core_attn is the common first candidate. It is strongest when unfused attention materializes score/probability tensors. With Transformer Engine fused or Flash Attention, compare it against [] because those backends already rematerialize attention internals.
    • Multi-Latent Attention (MLA): start with mla_up_proj when expanded Q/K/V projections dominate. Add core_attn only when the attention-core state still matters.
    • Grouped MoE: start with moe_act when the expert intermediate activation dominates; add layernorm when norm outputs are material. Use whole moe recompute only after accounting for the extra expert compute and communication it replays.
    • Dense FFN: mlp can save the whole dense-MLP activation region, but it usually costs more compute than a narrow output-discard boundary.
  4. Change one label at a time. Record per-rank allocated/reserved peaks plus steady-state step time or throughput; do not infer a global module ranking from one recipe.
  5. Full-layer recompute is allowed temporarily for diagnostic bring-up. Retain it in a final recipe only when target-scale measurements show that no recompute and supported selective boundaries still fail to fit, or matched runs show better end-to-end throughput with full recompute (for example, by enabling larger MBS or lower TP). Document the memory/OOM evidence, boundaries and layouts tested, and steady-state performance of the alternatives. Full recompute can severely reduce throughput and must not become the default from a bring-up success alone.
  6. Treat CUDA graphs, FP8, context-parallel communication, and overlap features as compatibility constraints, not afterthoughts.

Read the full file on GitHub · 290 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed · +10 lines 4a96c38741ad
  2. 25d ago Changed · -2 lines 2cca7d1b1328
  3. 1mo ago First seen · 282 lines · 79 tokens per session scan A 0e2b8ad0bf9e

Subscribe to this mod's changes

nemo-mbridge-perf-activation-recompute is a skill published in the GitHub repository NVIDIA-NeMo/Megatron-Bridge (970 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 5,018 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to nemo-mbridge-perf-activation-recompute, differing in 48 lines, and is treated as a copy.

Related

Other skills, from other repositories

debug-inference

Debug inference clients that use an attached provider and its native endpoint, including hosted APIs and host-local Ollama, vLLM, SGLang, TRT-LLM, LM Studio, or NIM. Use for provider attachment, endpoint policy, credential substitution, topology, and migration from the removed managed inference endpoint. Trigger…

NVIDIA/OpenShell · 120 tokens

spark-optimization

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

wshobson/agents · 37 tokens

notebooklm

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…

teng-lin/notebooklm-py · 79 tokens

oh-my-posh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.

JanDeDobbeleer/oh-my-posh · 47 tokens

spark-engineer

Use when writing Spark jobs, debugging performance issues, or configuring cluster settings for Apache Spark applications, distributed data processing pipelines, or big data workloads. Invoke to write DataFrame transformations, optimize Spark SQL queries, implement RDD pipelines, tune shuffle operations, configure…

Jeffallan/claude-skills · 75 tokens

rocketride-debugging-pipelines

Use when a RocketRide pipeline run failed, errored, or produced wrong/empty output, and you need to find the failing node and fix it. Reads run status and execution traces, diagnoses the cause, and routes back to design or configuration. Also use directly when asked to debug a run.

rocketride-org/rocketride-server · 67 tokens