<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>ZeRO on Duo&#39;s Tech Blog</title>
    <link>https://duoan.github.io/tags/zero/</link>
    <description>Recent content in ZeRO on Duo&#39;s Tech Blog</description>
    <image>
      <title>Duo&#39;s Tech Blog</title>
      <url>https://duoan.github.io/images/papermod-cover.png</url>
      <link>https://duoan.github.io/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.153.1</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 16 Jun 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://duoan.github.io/tags/zero/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The ZeRO-3 Diagram Most People Remember Is Wrong</title>
      <link>https://duoan.github.io/posts/zero3-intra-layer-partitioning/</link>
      <pubDate>Mon, 16 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://duoan.github.io/posts/zero3-intra-layer-partitioning/</guid>
      <description>&lt;h1 id=&#34;the-zero-3-diagram-most-people-remember-is-wrong&#34;&gt;The ZeRO-3 Diagram Most People Remember Is Wrong&lt;/h1&gt;
&lt;p&gt;Many engineers first learned ZeRO-3 from an animation that looked like pipeline parallelism.
One GPU owned early layers, another GPU owned later layers, and the active layer block appeared to be broadcast to all other GPUs when needed.
That picture is memorable.
It is also not the right mental model for current DeepSpeed ZeRO-3 training.&lt;/p&gt;
&lt;p&gt;The current steady-state model is intra-layer partitioning.
Each parameter is flattened, padded if necessary, and split across data-parallel ranks.
Before forward or backward compute needs that parameter, ranks AllGather the full parameter.
After gradients are produced, ranks ReduceScatter gradients back to the owning shards.
That is the operational reading of ZeRO-3 from the ZeRO paper (&lt;a href=&#34;https://arxiv.org/abs/1910.02054&#34;&gt;arXiv:1910.02054&lt;/a&gt;) and the current DeepSpeed runtime.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZeRO: Partitioning Optimizer State, Gradients, and Parameters</title>
      <link>https://duoan.github.io/posts/zero-redundancy-optimizer/</link>
      <pubDate>Sun, 27 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://duoan.github.io/posts/zero-redundancy-optimizer/</guid>
      <description>&lt;h1 id=&#34;zero-partitioning-optimizer-state-gradients-and-parameters&#34;&gt;ZeRO: Partitioning Optimizer State, Gradients, and Parameters&lt;/h1&gt;
&lt;p&gt;Plain DDP is clean but wasteful. Every data-parallel rank stores the same parameters, gradients, fp32 master weights, and optimizer moments. At small scale that redundancy is convenient. At LLM scale it is the memory wall.&lt;/p&gt;
&lt;p&gt;ZeRO, the Zero Redundancy Optimizer, keeps data-parallel semantics and removes the redundant storage one category at a time. ZeRO-1 shards optimizer state. ZeRO-2 shards optimizer state and gradients. ZeRO-3 shards optimizer state, gradients, and parameters (&lt;a href=&#34;https://arxiv.org/abs/1910.02054&#34;&gt;arXiv:1910.02054&lt;/a&gt;).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
