Composer: a new PyTorch library to train models ~2-4x faster with better algorithms
Hey all!

We're excited to release Composer ([https://github.com/mosaicml/composer](https://github.com/mosaicml/composer)), an open-source library to speed up training of deep learning models!

https://preview.redd.it/87if2pufdsn81.png?width=3009&amp;format=png&amp;auto=webp&amp;s=0238e6bf3050be3e4db27ca07dbbea80a16a7f49

Composer lets you train:

* A ResNet-101 to 78.1% accuracy on ImageNet in 1 hour and 30 minutes ($49 on AWS), **3.5x faster and 71% cheaper than the baseline.**
* A ResNet-50 to 76.51% accuracy on ImageNet in 1 hour and 14 minutes ($40 on AWS), **2.9x faster and 65% cheaper than the baseline.**
* A GPT-2 to a perplexity of 24.11 on OpenWebText in 4 hours and 27 minutes ($145 on AWS), **1.7x faster and 43% cheaper than the baseline.**

https://preview.redd.it/hf8u1mk1esn81.png?width=10008&amp;format=png&amp;auto=webp&amp;s=a5606571bf6a23c607d58648e654bdd2184afd83

Composer features a **functional interface** (similar to torch.nn.functional), which you can integrate into your own training loop, and a **trainer,** which handles seamless integration of efficient training algorithms into the training loop for you.

**Industry practitioners:** leverage our 20+ vetted and well-engineered implementations of speed-up algorithms to easily reduce time and costs to train models. Composer's built-in trainer makes it easy to **add multiple efficient training algorithms in a single line of code.** Trying out new methods or combinations of methods is as easy as changing a single list, and [we provide training recipes](https://github.com/mosaicml/composer#resnet-101) that yield the best training efficiency for popular benchmarks such as ResNets and GPTs.

**ML scientists:** use our two-way callback system in the Trainer **to easily prototype algorithms for wall-clock training efficiency.**[ Composer features tuned baselines to use in your research](https://github.com/mosaicml/composer/tree/dev/composer/yamls), and the software infrastructure to help study the impacts of an algorithm on training dynamics. Many of us wish we had this for our previous research projects!

**Feel free check out our GitHub repo:** [https://github.com/mosaicml/composer](https://github.com/mosaicml/composer), and star it ⭐️ to keep up with the latest updates!