Coder Social home page Coder Social logo

hjmshi / fairscale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookresearch/fairscale

0.0 0.0 0.0 4.57 MB

PyTorch extensions for high performance and large scale training.

License: Other

Shell 0.04% C++ 0.02% Python 99.24% C 0.01% Cuda 0.70%

fairscale's Introduction

FairScale Logo

Support Ukraine PyPI Documentation Status CircleCI PyPI - License Downloads PRs Welcome

Description

FairScale is a PyTorch extension library for high performance and large scale training. This library extends basic PyTorch capabilities while adding new SOTA scaling techniques. FairScale makes available the latest distributed training techniques in the form of composable modules and easy to use APIs. These APIs are a fundamental part of a researcher's toolbox as they attempt to scale models with limited resources.

FairScale was designed with the following values in mind:

  • Usability - Users should be able to understand and use FairScale APIs with minimum cognitive overload.

  • Modularity - Users should be able to combine multiple FairScale APIs as part of their training loop seamlessly.

  • Performance - FairScale APIs provide the best performance in terms of scaling and efficiency.

Watch Introductory Video

Explain Like Iโ€™m 5: FairScale

Installation

To install FairScale, please see the following instructions. You should be able to install a package with pip or conda, or build directly from source.

Getting Started

The full documentation contains instructions for getting started, deep dives and tutorials about the various FairScale APIs.

FSDP

FullyShardedDataParallel (FSDP) is the recommended method for scaling to large NN models. This library has been upstreamed to PyTorch. The version of FSDP here is for historical references as well as for experimenting with new and crazy ideas in research of scaling techniques. Please see the following blog for how to use FairScale FSDP and how does it work.

Testing

We use circleci to test FairScale with the following PyTorch versions (with CUDA 11.2):

  • the latest stable release (e.g. 1.10.0)
  • the latest LTS release (e.g. 1.8.1)
  • a recent nightly release (e.g. 1.11.0.dev20211101+cu111)

Please create an issue if you are having trouble with installation.

Contributors

We welcome contributions! Please see the CONTRIBUTING instructions for how you can contribute to FairScale.

License

FairScale is licensed under the BSD-3-Clause License.

fairscale.nn.pipe is forked from torchgpipe, Copyright 2019, Kakao Brain, licensed under Apache License.

fairscale.nn.model_parallel is forked from Megatron-LM, Copyright 2020, NVIDIA CORPORATION, licensed under Apache License.

fairscale.optim.adascale is forked from AdaptDL, Copyright 2020, Petuum, Inc., licensed under Apache License.

fairscale.nn.misc.flatten_params_wrapper is forked from PyTorch-Reparam-Module, Copyright 2018, Tongzhou Wang, licensed under MIT License.

Citing FairScale

If you use FairScale in your publication, please cite it by using the following BibTeX entry.

@Misc{FairScale2021,
  author =       {{FairScale authors}},
  title =        {FairScale:  A general purpose modular PyTorch library for high performance and large scale training},
  howpublished = {\url{https://github.com/facebookresearch/fairscale}},
  year =         {2021}
}

fairscale's People

Contributors

andersonic avatar anj-s avatar another-pjohnson avatar blefaudeux avatar crutcher avatar cyugao avatar dmitryvinn avatar epwalsh avatar eugenhotaj avatar foreveronehundred avatar froody avatar girifb avatar joshim5 avatar min-xu-ai avatar mrzzd avatar msbaines avatar myleott avatar pbelevich avatar quentinduval avatar riohib avatar ruanslv avatar shruti-bh avatar sidgoyal78 avatar sshleifer avatar stas00 avatar tmarkstrum avatar visionscaper avatar vittorio-caggiano avatar yuanyuan0057 avatar zhaojuanmao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.