deepspeed

Guides distributed training with DeepSpeed ZeRO optimization, pipeline parallelism, and mixed precision.

2|Updated Aug 15, 2026
One-click install
npx skills add https://github.com/Jensen-Yao/agents-skills --skill deepspeed-jensen-yao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: deepspeed
Source: https://github.com/Jensen-Yao/agents-skills/tree/main/skills/deepspeed
Command: npx skills add https://github.com/Jensen-Yao/agents-skills --skill deepspeed-jensen-yao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires deepspeed, torch, transformers, accelerate, and includes references (resource) components.

What problem does it solve? Training large deep learning models often exceeds single-GPU memory and compute limits, requiring complex distributed training configurations. This Skill provides expert guidance on DeepSpeed so you can scale model training across GPUs and nodes without trial-and-error configuration. ## Core Features & Use Cases - ZeRO Optimization Guidance: Configure ZeRO stages 1-3, ZeRO-Offload, and ZeRO-Infinity to partition optimizer states, gradients, and parameters across devices, CPU, and NVMe. - Parallelism & Mixed Precision: Set up pipeline parallelism, tensor parallelism, MoE training, and FP16/BF16/FP8 mixed precision for large-scale models. - Communication-Efficient Optimizers: Apply 1-bit Adam, 1-bit LAMB, and CPU-Adam to reduce communication overhead on bandwidth-limited clusters. - Use Case: You need to train a 13B-parameter model on limited GPU memory. Use this Skill to configure ZeRO-Offload with CPU offloading and get a working DeepSpeed JSON config plus launch command. ## Quick Start Ask the agent to help you write a DeepSpeed configuration for training your model with ZeRO stage 2 and BF16 mixed precision across 4 GPUs.

Frequently Asked Questions about deepspeed

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

FAQPage Schema
How do I configure DeepSpeed ZeRO for multi-GPU training?▼

Create a DeepSpeed JSON config specifying the ZeRO stage (1, 2, or 3) under zero_optimization, then pass it to deepspeed.initialize in your training script. Stage 3 partitions parameters, gradients, and optimizer states across all GPUs for maximum memory savings.

What is the difference between ZeRO stage 2 and stage 3?▼

ZeRO stage 2 partitions optimizer states and gradients across data-parallel ranks, while stage 3 additionally partitions model parameters themselves. Stage 3 enables training much larger models but adds parameter-gathering communication overhead.

Does DeepSpeed work with Hugging Face Transformers?▼

Yes, DeepSpeed integrates with Hugging Face Transformers and Accelerate by passing a DeepSpeed config file to the Trainer or accelerate launch command. The Skill lists transformers and accelerate as supported dependencies.

How do I train a model larger than GPU memory with DeepSpeed?▼

Use ZeRO-Offload to offload optimizer states and parameters to CPU memory, or ZeRO-Infinity to also leverage NVMe storage. This enables training models up to 13 billion parameters on a single GPU with competitive throughput.

Why does my DeepSpeed training run out of memory?▼

Out-of-memory errors usually come from an insufficient ZeRO stage, missing activation checkpointing, or no CPU offloading. Increase the ZeRO stage, enable gradient checkpointing, and configure offload_optimizer or offload_param to CPU or NVMe.

When should I use 1-bit Adam instead of regular Adam?▼

Use 1-bit Adam on bandwidth-limited clusters where communication is the bottleneck, as it reduces communication volume by up to 5x with the same convergence as Adam. It requires a warmup phase of roughly 15-20% of training steps before compression starts.