PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallel

Yanli Zhao, Andrew Gu, Rohan Varma, Liang Luo, Chien-Chin Huang +13 more
4/21/2023
cs.DCcs.AIcs.LG

No official code found. Best implementation: pytorch/pytorch (102,325 stars, last commit 2026-05-04).

Abstract

It is widely acknowledged that large models have the potential to deliver superior performance across a broad range of domains. Despite the remarkable progress made in the field of machine learning systems research, which has enabled the development and exploration of large models, such abilities remain confined to a small group of advanced users and industry leaders, resulting in an implicit technical barrier for the wider community to access and leverage these technologies. In this paper, we introduce PyTorch Fully Sharded Data Parallel (FSDP) as an industry-grade solution for large model training. FSDP has been closely co-designed with several key PyTorch core components including Tensor implementation, dispatcher system, and CUDA memory caching allocator, to provide non-intrusive user experiences and high training efficiency. Additionally, FSDP natively incorporates a range of techniques and settings to optimize resource utilization across a variety of hardware configurations. The experimental results demonstrate that FSDP is capable of achieving comparable performance to Distributed Data Parallel while providing support for significantly larger models with near-linear scalability in terms of TFLOPS.

View on arXivView PDF

Code Implementations(1)

pytorch/pytorchCommunity100%

Tensors and Dynamic neural networks in Python with strong GPU acceleration

102,32528,837C, C++Aug 13, 20165 months agoNOASSERTION
autograddeep-learninggpumachine-learningneural-network+3 more

Similar Papers

Cite this paper

@article{zhao2023pytorch,
  title  = {PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallel},
  author = {Yanli Zhao and Andrew Gu and Rohan Varma and Liang Luo and Chien-Chin Huang and Min Xu and Less Wright and Hamid Shojanazeri and Myle Ott and Sam Shleifer and Alban Desmaison and Can Balioglu and Pritam Damania and Bernard Nguyen and Geeta Chauhan and Yuchen Hao and Ajit Mathews and Shen Li},
  year   = {2023},
  eprint = {2304.11277},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.11277v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.11277.svg)](https://codeofpaper.com/paper/2304.11277)

Discussion