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 $0.00019 $0.01117
Sonnet 5 $0.00008 $0.00447
Haiku 4.5 $0.00004 $0.00223

Measured 9d ago against content hash 8654c5cbc5e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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. 9d 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 (904 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. 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

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

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

torchdrug

Build and troubleshoot 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 · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

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

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

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

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens

evo2

Score, embed, and generate DNA sequences with Evo 2, a long-context genomic foundation model. Use this skill when: (1) Computing per-nucleotide or per-sequence likelihoods for variant effect scoring, (2) Embedding genomic windows for downstream classification, (3) Generating DNA conditioned on a prefix, (4) Scoring…

aipoch/open-science · 83 tokens