Master LLMs with our FREE course in collaboration with Activeloop & Intel Disruptor Initiative. Join now!


The Zero Redundancy Optimizer (ZeRO): A Short Introduction with Python
Artificial Intelligence   Latest   Machine Learning

The Zero Redundancy Optimizer (ZeRO): A Short Introduction with Python

Last Updated on August 16, 2023 by Editorial Team

Author(s): Armin Norouzi, Ph.D

Originally published on Towards AI.

Uncover how Zero Redundancy Optimizer transforms data parallelism, boosting memory and computational efficacy.

This member-only story is on us. Upgrade to access all of Medium.


The Zero Redundancy Optimizer (ZeRO) improves data parallelism by decreasing memory redundancies. ZeRO divides model states across processes across three stages: optimizer states, gradients, and parameters. This partitioning enhances speed by allowing larger models to be trained on smaller computers using a single GPU. The DeepSpeed and HuggingFace libraries can be used to implement this.

Before starting, if you want to learn more about generative AI, I suggest checking out my other posts using the below list:

Armin Norouzi, Ph.D

View list9 stories

Now, let’s get started!

Data parallelism is an essential technique… Read the full blog for free on Medium.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI

Feedback ↓