Debian Codegraph @

examples/config_yaml_templates/deepspeed.yaml

raw
1 # Similar to FSDP, we set the distributed type as DEEPSPEED
2 distributed_type: DEEPSPEED
3 # With DeepSpeed, we utilize a deepspeed config file for the entire configuration
4 deepspeed_config:
5 # Can also be any of the config json's in accelerate/examples/deepspeed_config_templates
6 deepspeed_config_file: ../deepspeed_config_templates/zero_stage1_config.json
7 # If using ZeRO-3 and wanting to load big models in, this should be set to `true` so
8 # `transformers` uses the right `init` function
9 zero3_init_flag: false # true
10
11 # Finally we need to specify the number of accelerators to use
12 num_processes: 2
13 # Optionally we can set the mixed precision now instead of in the deepspeed config file,
14 # however this requires the `fp16` and `bf16` options to be set to `auto` in the deepspeed config file
15 # mixed_precision: "bf16"