zejunwang1 / bloom_tuning

BLOOM 模型的指令微调
Apache License 2.0
24 stars 1 forks source link

你好,请问怎么启用 offload_optimizer #5

Open youzihaha opened 1 year ago

zejunwang1 commented 1 year ago

将 deepspeed 的配置文件修改为:

{ "train_batch_size": "auto", "train_micro_batch_size_per_gpu": "auto", "gradient_accumulation_steps": "auto", "gradient_clipping": "auto", "fp16": { "enabled": "auto", "loss_scale": 0, "initial_scale_power": 16, "loss_scale_window": 1000, "hysteresis": 2, "min_loss_scale": 1 }, "bf16": { "enabled": "auto" }, "zero_optimization": { "stage": 3, "offload_optimizer": { "device": "cpu", "pin_memory": true }, "allgather_partitions": true, "allgather_bucket_size": 5e8, "overlap_comm": true, "reduce_scatter": true, "reduce_bucket_size": 5e8, "contiguous_gradients" : true, "stage3_gather_16bit_weights_on_model_save": true } }

youzihaha commented 1 year ago

好的,谢谢你