1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-31 10:35:30 +02:00
tldr/pages/common/accelerate.md
Lena 0fddee2272
pages/*: reword descriptions to comply with the style guide (#11507)
* pages/*: reword descriptions to comply with the style guide

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-11-15 09:55:25 +05:30

767 B

Accelerate

A library that enables the same PyTorch code to be run across any distributed configuration. More information: https://huggingface.co/docs/accelerate/index.

  • Print environment information:

accelerate env

  • Interactively create a configuration file:

accelerate config

  • Print the estimated GPU memory cost of running a huggingface model with different data types:

accelerate estimate-memory {{name/model}}

  • Test an Accelerate configuration file:

accelerate test --config_file {{path/to/config.yaml}}

  • Run a model on CPU with Accelerate:

accelerate launch {{path/to/script.py}} {{--cpu}}

  • Run a model on multi-GPU with Accelerate, with 2 machines:

accelerate launch {{path/to/script.py}} --multi_gpu --num_machines {{2}}