memory-tuning
OfficialCut GPU memory waste and avoid OOM in Megatron-LM.
Software Engineering#memory-management#oom#megatron-lm#gpu-memory#cpu-offloading#expandable_segments#activation-recompute
AuthorNVIDIA
Version1.0.0
Installs0
System Documentation
What problem does it solve?
GPU memory fragmentation and peak memory usage during Megatron training often cause OOM or reduced throughput. This memory-tuning guide provides proven fixes to stabilize training on large models.
Core Features & Use Cases
- Expandable segments: reduce fragmentation by using non-fixed memory blocks.
- Activation recompute: selectively recompute activations to save peak memory.
- CPU offloading constraints: guidance on when offloading is compatible with parallelism.
- Parallelism tuning: advise TP/PP/DP trade-offs to fit memory budgets for large-scale training.
Quick Start
Set PYTORCH_CUDA_ALLOC_CONF to expandable_segments:True before launching Megatron training.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: memory-tuning Download link: https://github.com/NVIDIA/skills/archive/main.zip#memory-tuning Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.