HumboldtJoker commited on
Commit
ea74ace
·
verified ·
1 Parent(s): d6328ff

Add training template: ds_config_zero2.json

Browse files
training-template/ds_config_zero2.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_NOTE": "ZeRO Stage 2 for full-parameter SFT on single H200 SXM. Stage 2 shards gradients (not params) and offloads optimizer states to CPU RAM. No optimizer block here — Adafactor is configured in the training script directly, because DeepSpeed's optimizer config conflicts with custom optimizers passed to the Trainer.",
3
+
4
+ "bf16": {
5
+ "enabled": true
6
+ },
7
+
8
+ "zero_optimization": {
9
+ "stage": 2,
10
+
11
+ "offload_optimizer": {
12
+ "device": "cpu",
13
+ "pin_memory": true
14
+ },
15
+
16
+ "offload_param": {
17
+ "device": "none"
18
+ },
19
+
20
+ "overlap_comm": true,
21
+ "contiguous_gradients": true,
22
+ "reduce_scatter": true
23
+ },
24
+
25
+ "gradient_clipping": 1.0,
26
+ "gradient_accumulation_steps": 8,
27
+ "train_micro_batch_size_per_gpu": 1,
28
+ "steps_per_print": 10
29
+ }