nemo-mbridge-perf-cpu-offloading

nemo-mbridge-perf-cpu-offloading is a skill for Claude Code from NVIDIA-NeMo/Megatron-Bridge. It costs 39 tokens per session (2,234 once invoked), scanned A, a copy of nemo-mbridge-perf-cpu-offloading, Apache-2.0.

A guide to moving model data from GPU memory to CPU memory in Megatron Bridge, a tool for training large language models. It covers layer activations and Adam optimizer state, which stores training updates.

In plain words
What is it for?
Use it to choose, configure, and validate activation or optimizer offloading, including partial optimizer offloading. It also explains limits such as activation offloading requiring one pipeline stage.
Why use it?
It helps reduce GPU memory use when a model does not fit. The trade-off is extra data movement, which can slow training.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/training/run_recipe.py \.

Good fit Use it to choose, configure, and validate activation or optimizer offloading, including partial optimizer offloading. It also explains limits such as activation offloading requiring one pipeline stage.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/NVIDIA-NeMo/Megatron-Bridge
agentmods
npx agentmods add skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading

Made for: Claude Code.

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-cpu-offloading

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading/github.svg)](https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading)
Your own site
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading/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-cpu-offloading

Your own site · 80×15
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cpu-offloading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,234 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 100% 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.00039 $0.02234
Opus 5.5 $0.00016 $0.00894
Sonnet 5.5 $0.00008 $0.00447
Haiku 4.5 $0.00004 $0.00223

Measured 1mo ago against content hash 8654c5cbc5e1, 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-cpu-offloading 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 1mo 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

100% identical to nemo-mbridge-perf-cpu-offloading — 0 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-cpu-offloading/SKILL.md · 232 lines

How it starts

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

CPU Offloading

References

  • Stable docs: @docs/training/cpu-offloading.md
  • Structured metadata: @skills/nemo-mbridge-perf-cpu-offloading/card.yaml

What It Is

Two independent mechanisms to move data from GPU to CPU memory:

Mechanism Config namespace What gets offloaded PP restriction
Activation offloading model.cpu_offloading* Activations (and optionally weights) per transformer layer PP must be 1
Optimizer offloading optimizer.optimizer_cpu_offload Adam optimizer states (momentum + variance) via HybridDeviceOptimizer None

Quick Decision

Situation Recommendation
Large MoE model (30B+), needs PP > 1 Optimizer offloading — activation offloading is blocked by PP=1
Small/medium model, PP=1 fits, activation memory dominates Activation offloading
Want tunable memory-speed tradeoff Optimizer offloading with fractional optimizer_offload_fraction
Throughput is top priority Don't enable — offloading always adds overhead
CUDA graphs are needed Only optimizer offloading — activation offloading is incompatible
Memory pressure is moderate Optimizer offload at 25–50% fraction for best efficiency

Enablement

Optimizer CPU offloading (recommended for large models)

cfg.optimizer.optimizer_cpu_offload = True
cfg.optimizer.optimizer_offload_fraction = 1.0
cfg.optimizer.overlap_cpu_optimizer_d2h_h2d = True

CLI overrides:

optimizer.optimizer_cpu_offload=True \
optimizer.optimizer_offload_fraction=0.5 \
optimizer.overlap_cpu_optimizer_d2h_h2d=True

Activation CPU offloading (small/medium models only)

cfg.model.cpu_offloading = True
cfg.model.cpu_offloading_num_layers = 16
cfg.model.cpu_offloading_activations = True
cfg.model.cpu_offloading_weights = False

cfg.model.pipeline_model_parallel_size = 1
cfg.model.recompute_granularity = None
cfg.model.cuda_graph_impl = "none"

Config Parameter Reference

Optimizer offloading

Read the full file on GitHub · 232 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. 1mo ago First seen · 232 lines · 39 tokens per session scan A 8654c5cbc5e1

Subscribe to this mod's changes

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

Related

Other skills, from other repositories

torchdrug

Builds and troubleshoots TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 64 tokens

arboreto

Infers candidate gene regulatory networks from bulk or single-cell expression data using AertsLab Arboreto GRNBoost2 and GENIE3. Use for transcription factor-target association ranking, compatible Dask execution, sparse expression inputs, and network stability checks.

K-Dense-AI/scientific-agent-skills · 55 tokens

deepspot-m

Generates transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Used for predicted log1p-CPM expression from 224x224 tiles at about 20x, querying the released protein-coding gene panel by symbol, and whole-slide prediction after resolution-aware tiling with histolab.

K-Dense-AI/scientific-agent-skills · 70 tokens

pyhealth

Builds and validates PyHealth clinical machine-learning pipelines for EHR, signals, imaging, and medical codes. Use for PyHealth dataset loading, MIMIC-III/IV, eICU or OMOP prediction tasks, patient-level evaluation, mortality/readmission/length-of-stay modeling, medication recommendation, sleep staging, Trainer…

K-Dense-AI/scientific-agent-skills · 84 tokens

nemo-mbridge-perf-expert-parallel-overlap

Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.

NVIDIA/skills · 56 tokens

ml-training-recipes

Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics. Covers training loops, optimizer selection (AdamW, Muon), LR scheduling, mixed precision, debugging, and systematic experimentation. Use when training or fine-tuning…

Orchestra-Research/AI-Research-SKILLs · 88 tokens