<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>ZeRO - 标签 - 集合通信博客</title><link>https://hccl.club/tags/zero/</link><description>ZeRO - 标签 - 集合通信博客</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Fri, 06 Nov 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://hccl.club/tags/zero/" rel="self" type="application/rss+xml"/><item><title>ZeRO 与 FSDP：分片带来的通信</title><link>https://hccl.club/docs/training/zero-fsdp-communication/</link><pubDate>Fri, 06 Nov 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/training/zero-fsdp-communication/</guid><description>&lt;p>数据并行的显存瓶颈不在模型，而在训练状态：混合精度 (mixed precision) 加 Adam 之下，每个参数要占用 16 字节量级的状态显存，7B 模型在每张卡上就要留出 112 GB，参数副本根本放不下。ZeRO（Zero Redundancy Optimizer）的答案是：这些状态本来就没必要在每个 rank 上各存一份——按 rank 切片存储，用到时再用集合通信临时拼回来。&lt;/p>
&lt;p>分片改变了通信模式：DDP 是每步一次大 AllReduce，ZeRO-3 与 PyTorch FSDP（Fully Sharded Data Parallel）则把通信摊到每一层——前向用参数前 AllGather 拼回整层参数，反向算完梯度再 ReduceScatter 归约分片。本文梳理三级分片各自的通信代价、每层通信的时序、以及 ZeRO++ 如何把多出来的通信再压回去。&lt;/p></description></item><item><title>AllGather：全收集</title><link>https://hccl.club/docs/primitives/allgather/</link><pubDate>Mon, 02 Nov 2026 11:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/primitives/allgather/</guid><description><![CDATA[<p>全收集（AllGather）是 Gather 的&quot;民主版&quot;：每个进程都把自己的块贡献出去，同时拿到所有进程的块，相当于人人都是 root 的 Gather。它是多对多通信的核心原语之一，大模型训练中的 ZeRO 参数聚合、张量并行的结果拼接都靠它完成。</p>]]></description></item></channel></rss>