ve to configure your environment with accelerate config to enable DeepSpeed stage 2.
The configuration file should look like this:


	Copied
compute_environment: LOCAL_MACHINE
deepspeed_config:
  gradient_accumulation_steps: 4
  offload_optimizer_device: cpu
  offload_param_device: cpu
  zero3_init_flag: false
  zero_stage: 2
distributed_type: DEEPSPEED
<Tip>
See documentation for more DeepSpeed configuration options.
<Tip>
Changing the default