CLI for AcceleratorModule library (accmt).
Project description
AcceleratorModule CLI
CLI for AcceleratorModule library (accmt).
This is a command-line tool wrapper around Accelerate's command-line utilities ('accelerate').
Installation
accmt-cli is automatically installed when installing accmt library. You also install it via pip:
pip install accmt-cli
Launch
You can launch any distributed training process with the following command:
accmt launch [-N][-n, --gpus][-O1][--strat] <your_python_script> [...]
Where:
- -N (optional): Corresponds to the number of processes, or a Python-like slice to take GPUs from a certain index (e.g. '-N=2:', to take GPUs from index 2).
- -n or --gpus (optional): Corresponds to a list of CUDA devices (e.g. '-n=1,3,5,6', to take GPUs indices 1, 3, 5 and 6).
- -O1 (optional): Corresponds to the optimization of type 1, which calculates the efficient number for 'OMP_NUM_THREADS', depending on how many processes you will run you training script.
- --strat (optional): Corresponds to the specific strategy to implement, or a configuration file path from Accelerate ('accelerate config --config_file=your-config.yaml'). See 'accmt strats' for specific strategies. ... (optional): You can add here any additional arguments that your Python script might have.
Get model from checkpoint
You can get a model from any checkpoint using the following command:
accmt get <checkpoint> --out=<output-model-directory> [--dtype]
Where:
- --out or -O (REQUIRED): Output model directory name where to save the model.
- --dtype (Optional): PyTorch data type of model parameters. Default is 'float32'.
Strats
You can check the specific strats included with the following command:
accmt strats [--ddp][--fsdp][--deepspeed]
Where:
- --ddp: To only filter for DDP strategies.
- --fsdp: To only filter for FSDP strategies.
- --deepspeed: To only filter for DeepSpeed strategies.
Example
Generate an example HPS file config with the following command:
accmt example
This will generate a file on your current directory called 'hps_example.yaml'.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file accmt_cli-1.2.0.2.tar.gz
.
File metadata
- Download URL: accmt_cli-1.2.0.2.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5277da459a283bb7e56cabc25099d9b7023db5e33e2b4e048a6411ed8ede3b14 |
|
MD5 | a123d93f4d0e67741aecf5b22d5b1a28 |
|
BLAKE2b-256 | 6baddaae2f3e3443036fbc591d4e43388e4ed22015710e648287e324f8da7b2b |
File details
Details for the file accmt_cli-1.2.0.2-py3-none-any.whl
.
File metadata
- Download URL: accmt_cli-1.2.0.2-py3-none-any.whl
- Upload date:
- Size: 62.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e085be349bf796f2e51da120eb29fe7214750c301887b0106abe57ef6c346fad |
|
MD5 | 254453228bfdbca13b49c96ccea5f961 |
|
BLAKE2b-256 | f79f6c1f2ffd6b4b823d2887b69b0fe166877da71083d9646d7e3a5b27390845 |