fairscale
torchscale
fairscale | torchscale | |
---|---|---|
6 | 2 | |
2,907 | 2,922 | |
2.4% | 1.6% | |
4.5 | 7.2 | |
5 days ago | 25 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fairscale
-
[R] TorchScale: Transformers at Scale - Microsoft 2022 Shuming Ma et al - Improves modeling generality and capability, as well as training stability and efficiency.
I skimmed through the README and paper. What does this library have that that hasn't been included in xformers or fairscale?
-
[D] DeepSpeed vs PyTorch native API
Things are slowly moving into PyTorch upstream such as the ZeRO redundancy optimizer but from my experience the team behind DeepSpeed just move faster. There is also fairscale from the FAIR team which seems to be a staging ground for experimental optimizations before they move into PyTorch. If you use Lightning, it's easy enough to try out these various libraries (docs here)
-
How to Train Large Models on Many GPUs?
DeepSpeed [1] is amazing tool to enable the different kind of parallelisms and optimizations on your model. I would definitely not recommend reimplementing everything yourself.
Probably FairScale [2] too, but never tried it myself.
[1]: https://github.com/microsoft/DeepSpeed
[2]: https://github.com/facebookresearch/fairscale
-
[P] PyTorch Lightning Multi-GPU Training Visualization using minGPT, from 250 Million to 4+ Billion Parameters
It was helpful for me to see how DeepSpeed/FairScale stack up compared to vanilla PyTorch Distributed Training specifically when trying to reach larger parameter sizes, visualizing the trade off with throughput. A lot of the learnings ended up in the Lightning Documentation under the advanced GPU docs!
-
[D] Training 10x Larger Models and Accelerating Training with ZeRO-Offloading
I created a feature request on the FairScale project so that we can track the progress on the integration: Support ZeRO-Offload · Issue #337 · facebookresearch/fairscale (github.com)
torchscale
-
Retentive Network: A Successor to Transformer Implemented in PyTorch
A retnet commit has now appeared in Microsoft's torchscale repo:
https://github.com/microsoft/torchscale/commit/bf65397b26469...
- [R] TorchScale: Transformers at Scale - Microsoft 2022 Shuming Ma et al - Improves modeling generality and capability, as well as training stability and efficiency.
What are some alternatives?
DeepSpeed - DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
towhee - Towhee is a framework that is dedicated to making neural data processing pipelines simple and fast.
Megatron-DeepSpeed - Ongoing research training transformer language models at scale, including: BERT & GPT-2
bertviz - BertViz: Visualize Attention in NLP Models (BERT, GPT2, BART, etc.)
ColossalAI - Making large AI models cheaper, faster and more accessible
extreme-bert - ExtremeBERT is a toolkit that accelerates the pretraining of customized language models on customized datasets, described in the paper “ExtremeBERT: A Toolkit for Accelerating Pretraining of Customized BERT”.
pytorch-lightning - Build high-performance AI models with PyTorch Lightning (organized PyTorch). Deploy models with Lightning Apps (organized Python to build end-to-end ML systems). [Moved to: https://github.com/Lightning-AI/lightning]
xformers - Hackable and optimized Transformers building blocks, supporting a composable construction.