Skip to content

Commit

Permalink
Fix Doc Error: ZeRO Stage 2 gradient partitioning (#6775)
Browse files Browse the repository at this point in the history
Fix the issue described in
#6707
  • Loading branch information
yewentao256 authored Nov 25, 2024
1 parent 5e16f25 commit d6410f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/_tutorials/zero.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ZeRO leverages the aggregate computation and memory resources of data parallelis

* **Stage 1**: The optimizer states (e.g., for [Adam optimizer](https://arxiv.org/abs/1412.6980), 32-bit weights, and the first, and second moment estimates) are partitioned across the processes, so that each process updates only its partition.

* **Stage 2**: The reduced 32-bit gradients for updating the model weights are also partitioned such that each process retains only the gradients corresponding to its portion of the optimizer states.
* **Stage 2**: The reduced 16-bit gradients for updating the model weights are also partitioned such that each process retains only the gradients corresponding to its portion of the optimizer states.

* **Stage 3**: The 16-bit model parameters are partitioned across the processes. ZeRO-3 will automatically collect and partition them during the forward and backward passes.

Expand Down
2 changes: 1 addition & 1 deletion docs/code-docs/source/zero3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ communication efficiency.

#. **ZeRO Stage 1**: The optimizer states (e.g., for `Adam optimizer <https://arxiv.org/abs/1412.6980>`_, 32-bit weights, and the first, and second moment estimates) are partitioned across the processes, so that each process updates only its partition.

#. **ZeRO Stage 2**: The reduced 32-bit gradients for updating the model weights are also partitioned such that each process retains only the gradients corresponding to its portion of the optimizer states.
#. **ZeRO Stage 2**: The reduced 16-bit gradients for updating the model weights are also partitioned such that each process retains only the gradients corresponding to its portion of the optimizer states.

#. **ZeRO Stage 3**: The 16-bit model parameters are partitioned across the processes. ZeRO-3 will automatically collect and partition them during the forward and backward passes.

Expand Down

0 comments on commit d6410f9

Please sign in to comment.