DeepSpeed ZeRO Tutorial: Fine-Tune LLMs Across Multiple GPUs

Ready Tensor · Beginner ·🧠 Large Language Models ·7mo ago

About this lesson

In this video, we walk through how to fine-tune a 3B parameter language model across multiple GPUs using DeepSpeed ZeRO. You'll learn how to: - Configure DeepSpeed for multi-GPU training - Understand the trade-offs between ZeRO-2 and ZeRO-3 - Fix out-of-memory errors by sharding model states - Use Hugging Face Trainer with DeepSpeed - Evaluate performance and memory utilization - Compare runtime between DDP, ZeRO-2, and ZeRO-3 Timestamps: 0:00 - Intro: What we’ll cover in this DeepSpeed demo 0:28 - ZeRO-1, ZeRO-2, ZeRO-3: What they shard and why it matters 1:11 - Overview of config files for ZeRO-2 and ZeRO-3 2:30 - Running full fine-tuning with ZeRO-2 (OOM error) 4:22 - Switching to ZeRO-3 and successful training 5:07 - Comparing training time and performance 6:03 - Does full fine-tuning outperform QLoRA? 7:02 - Memory analysis and why ZeRO-2 failed Watch this if you’re training large language models that don’t fit on a single GPU, and want to avoid expensive hardware upgrades. This demo shows how DeepSpeed helps shard memory across devices and make full fine-tuning feasible even with limited resources. This video is part of the LLM Engineering and Deployment Certification Program by Ready Tensor. ✅ Enroll Now: https://app.readytensor.ai/certifications/llm-engineering-and-deployment-DAROCXlj About Ready Tensor: Ready Tensor helps AI/ML professionals build and evaluate intelligent, goal-driven systems and showcase them through certifications, competitions, and real-world project publications. 🌐 Learn more: https://www.readytensor.ai/ 👍 Like the video? Subscribe and tell us what you'd like to see next.

Original Description

In this video, we walk through how to fine-tune a 3B parameter language model across multiple GPUs using DeepSpeed ZeRO. You'll learn how to: - Configure DeepSpeed for multi-GPU training - Understand the trade-offs between ZeRO-2 and ZeRO-3 - Fix out-of-memory errors by sharding model states - Use Hugging Face Trainer with DeepSpeed - Evaluate performance and memory utilization - Compare runtime between DDP, ZeRO-2, and ZeRO-3 Timestamps: 0:00 - Intro: What we’ll cover in this DeepSpeed demo 0:28 - ZeRO-1, ZeRO-2, ZeRO-3: What they shard and why it matters 1:11 - Overview of config files for ZeRO-2 and ZeRO-3 2:30 - Running full fine-tuning with ZeRO-2 (OOM error) 4:22 - Switching to ZeRO-3 and successful training 5:07 - Comparing training time and performance 6:03 - Does full fine-tuning outperform QLoRA? 7:02 - Memory analysis and why ZeRO-2 failed Watch this if you’re training large language models that don’t fit on a single GPU, and want to avoid expensive hardware upgrades. This demo shows how DeepSpeed helps shard memory across devices and make full fine-tuning feasible even with limited resources. This video is part of the LLM Engineering and Deployment Certification Program by Ready Tensor. ✅ Enroll Now: https://app.readytensor.ai/certifications/llm-engineering-and-deployment-DAROCXlj About Ready Tensor: Ready Tensor helps AI/ML professionals build and evaluate intelligent, goal-driven systems and showcase them through certifications, competitions, and real-world project publications. 🌐 Learn more: https://www.readytensor.ai/ 👍 Like the video? Subscribe and tell us what you'd like to see next.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
Hardening Applications That Call LLMs: 16 Security Controls That Actually Matter
Learn 16 essential security controls to harden applications that call LLMs and protect against traditional web vulnerabilities and new attack surfaces
Dev.to · Reno Lu
📰
LLM-as-Judge Shouldn't Aggregate Scores: Binary Checks as Evidence, One Holistic Verdict
Learn to design LLM-as-judge systems using binary checks and holistic verdicts, avoiding score aggregation
Dev.to · Tatsuya Shimomoto
📰
PIM-DBS: Back Up, Restore, and Verify Your AI Persona — a protocol born from a failed rescue
Learn how to back up, restore, and verify your AI persona using the PIM-DBS protocol, a crucial step in ensuring AI continuity and reliability.
Dev.to AI
📰
OWASP LLM05:2025 : Improper Output Handling — When the Model’s Response Becomes the Attack
Learn about OWASP LLM05:2025, a security risk related to improper output handling in LLMs, and how to mitigate it
Medium · LLM

Chapters (8)

Intro: What we’ll cover in this DeepSpeed demo
0:28 ZeRO-1, ZeRO-2, ZeRO-3: What they shard and why it matters
1:11 Overview of config files for ZeRO-2 and ZeRO-3
2:30 Running full fine-tuning with ZeRO-2 (OOM error)
4:22 Switching to ZeRO-3 and successful training
5:07 Comparing training time and performance
6:03 Does full fine-tuning outperform QLoRA?
7:02 Memory analysis and why ZeRO-2 failed
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →