From e4b61a1da1ee30a41a4ca25343f6aa93f8f45f12 Mon Sep 17 00:00:00 2001 From: bingshuo <565183519@qq.com> Date: Mon, 18 May 2026 11:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B8=E6=B8=8A:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B9=8B=E4=B9=8Bv2=20DeepSpeed=20ZeRO-2=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/training/zhizhi_v2/ds_config.json | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 scripts/training/zhizhi_v2/ds_config.json diff --git a/scripts/training/zhizhi_v2/ds_config.json b/scripts/training/zhizhi_v2/ds_config.json new file mode 100644 index 0000000..058a027 --- /dev/null +++ b/scripts/training/zhizhi_v2/ds_config.json @@ -0,0 +1,56 @@ +{ + "train_batch_size": "auto", + "train_micro_batch_size_per_gpu": 1, + "gradient_accumulation_steps": 8, + "optimizer": { + "type": "AdamW", + "params": { + "lr": 5e-6, + "betas": [0.9, 0.999], + "eps": 1e-8, + "weight_decay": 0.01 + } + }, + "scheduler": { + "type": "WarmupLR", + "params": { + "warmup_min_lr": 0, + "warmup_max_lr": 5e-6, + "warmup_num_steps": 100 + } + }, + "zero_optimization": { + "stage": 2, + "offload_optimizer": { + "device": "cpu", + "pin_memory": true + }, + "allgather_partitions": true, + "allgather_bucket_size": 2e8, + "overlap_comm": true, + "reduce_scatter": true, + "reduce_bucket_size": 2e8, + "contiguous_gradients": true + }, + "gradient_clipping": 1.0, + "fp16": { + "enabled": "auto", + "loss_scale": 0, + "loss_scale_window": 1000, + "initial_scale_power": 16, + "hysteresis": 2, + "min_loss_scale": 1 + }, + "bf16": { + "enabled": "auto" + }, + "activation_checkpointing": { + "partition_activations": false, + "cpu_checkpointing": false, + "contiguous_memory_optimization": false, + "number_checkpoints": null, + "synchronize_checkpoint_boundary": false, + "profile": false + }, + "wall_clock_breakdown": false +}