Installation
Installation and Configuration
Before you start, you will need to setup your environment, install the appropriate packages, and configure ๐ Accelerate. ๐ Accelerate is tested on Python 3.8+.
Installing ๐ Accelerate
๐ Accelerate is available on pypi and conda, as well as on GitHub. Details to install from each are below:
pip
To install ๐ Accelerate from pypi, perform:
Copied
conda
๐ Accelerate can also be installed with conda with:
Copied
Source
New features are added every day that havenโt been released yet. To try them out yourself, install from the GitHub repository:
Copied
If youโre working on contributing to the library or wish to play with the source code and see live results as you run the code, an editable version can be installed from a locally-cloned version of the repository:
Copied
Configuring ๐ Accelerate
After installing, you need to configure๐ Accelerate for how the current system is setup for training. To do so run the following and answer the questions prompted to you:
Copied
To write a barebones configuration that doesnโt include options such as DeepSpeed configuration or running on TPUs, you can quickly run:
Copied
๐ Accelerate will automatically utilize the maximum number of GPUs available and set the mixed precision mode.
To check that your configuration looks fine, run:
Copied
An example output is shown below, which describes two GPUs on a single machine with no mixed precision being used:
Copied
Last updated