And initialize an [🤗 Accelerate](https://github.com/huggingface/accelerate/) environment with:  
```bash
accelerate config
```  
Or for a default accelerate configuration without answering questions about your environment  
```bash
accelerate config default
```  
Or if your environment doesn't support an interactive shell (e.g., a notebook)  
```python
from accelerate.utils import write_basic_config
write_basic_config()
```