Skip to content

Commit c7d44f2

Browse files
authored
[RL] Fix loading amp custom list from .yaml (#10544)
* fix * add rf++
1 parent bb83432 commit c7d44f2

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

llm/config/llama/grpo_argument.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ recompute_granularity: "full" # Granularity of recompute
108108
bf16: true # Whether to use mixed precision with bfloat16
109109
fp16_opt_level: "O2" # Optimization level for fp16 and bf16 training
110110
amp_master_grad: false # Whether to use float32 weight gradients for master weights in amp opt level=’O2’
111-
amp_custom_black_list: "reduce_sum softmax_with_cross_entropy c_softmax_with_cross_entropy elementwise_div sin cos" # Custom black list for amp
112-
amp_custom_white_list: "lookup_table lookup_table_v2 flash_attn matmul matmul_v2 fused_gemm_epilogue" # Custom white list for amp
111+
amp_custom_black_list: ["reduce_sum", "softmax_with_cross_entropy", "c_softmax_with_cross_entropy", "elementwise_div", "sin", "cos"] # Custom black list for amp
112+
amp_custom_white_list: ["lookup_table", "lookup_table_v2", "flash_attn", "matmul", "matmul_v2", "fused_gemm_epilogue"] # Custom white list for amp
113113
offload_level: "freeze_model" # Level of model offloading to pinned memory, supported values: freeze_model, train_model, optimizer
114114
release_grads: true # Whether to release gradients
115115
offload_optim: false # Whether to offload optimizer to pinned memory

llm/config/qwen/grpo_32b_argument.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ recompute_granularity: "full" # Granularity of recompute
109109
bf16: true # Whether to use mixed precision with bfloat16
110110
fp16_opt_level: "O2" # Optimization level for fp16 and bf16 training
111111
amp_master_grad: false # Whether to use float32 weight gradients for master weights in amp opt level=’O2’
112-
amp_custom_black_list: "reduce_sum softmax_with_cross_entropy c_softmax_with_cross_entropy elementwise_div sin cos" # Custom black list for amp
113-
amp_custom_white_list: "lookup_table lookup_table_v2 flash_attn matmul matmul_v2 fused_gemm_epilogue" # Custom white list for amp
112+
amp_custom_black_list: ["reduce_sum", "softmax_with_cross_entropy", "c_softmax_with_cross_entropy", "elementwise_div", "sin", "cos"] # Custom black list for amp
113+
amp_custom_white_list: ["lookup_table", "lookup_table_v2", "flash_attn", "matmul", "matmul_v2", "fused_gemm_epilogue"] # Custom white list for amp
114114
offload_level: "freeze_model" # Level of model offloading to pinned memory, supported values: freeze_model, train_model, optimizer
115115
release_grads: true # Whether to release gradients
116116
offload_optim: true # Whether to offload optimizer to pinned memory

llm/config/qwen/grpo_argument.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ recompute_granularity: "full" # Granularity of recompute
109109
bf16: true # Whether to use mixed precision with bfloat16
110110
fp16_opt_level: "O2" # Optimization level for fp16 and bf16 training
111111
amp_master_grad: false # Whether to use float32 weight gradients for master weights in amp opt level=’O2’
112-
amp_custom_black_list: "reduce_sum softmax_with_cross_entropy c_softmax_with_cross_entropy elementwise_div sin cos" # Custom black list for amp
113-
amp_custom_white_list: "lookup_table lookup_table_v2 flash_attn matmul matmul_v2 fused_gemm_epilogue" # Custom white list for amp
112+
amp_custom_black_list: ["reduce_sum", "softmax_with_cross_entropy", "c_softmax_with_cross_entropy", "elementwise_div", "sin", "cos"] # Custom black list for amp
113+
amp_custom_white_list: ["lookup_table", "lookup_table_v2", "flash_attn", "matmul", "matmul_v2", "fused_gemm_epilogue"] # Custom white list for amp
114114
offload_level: "freeze_model" # Level of model offloading to pinned memory, supported values: freeze_model, train_model, optimizer
115115
release_grads: true # Whether to release gradients
116116
offload_optim: false # Whether to offload optimizer to pinned memory

llm/config/qwen/reinforce_plus_plus_argument.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ recompute_granularity: "full" # Granularity of recompute
109109
bf16: true # Whether to use mixed precision with bfloat16
110110
fp16_opt_level: "O2" # Optimization level for fp16 and bf16 training
111111
amp_master_grad: false # Whether to use float32 weight gradients for master weights in amp opt level=’O2’
112-
amp_custom_black_list: "reduce_sum softmax_with_cross_entropy c_softmax_with_cross_entropy elementwise_div sin cos" # Custom black list for amp
113-
amp_custom_white_list: "lookup_table lookup_table_v2 flash_attn matmul matmul_v2 fused_gemm_epilogue" # Custom white list for amp
112+
amp_custom_black_list: ["reduce_sum", "softmax_with_cross_entropy", "c_softmax_with_cross_entropy", "elementwise_div", "sin", "cos"] # Custom black list for amp
113+
amp_custom_white_list: ["lookup_table", "lookup_table_v2", "flash_attn", "matmul", "matmul_v2", "fused_gemm_epilogue"] # Custom white list for amp
114114
offload_level: "freeze_model" # Level of model offloading to pinned memory, supported values: freeze_model, train_model, optimizer
115115
release_grads: true # Whether to release gradients
116116
offload_optim: false # Whether to offload optimizer to pinned memory

0 commit comments

Comments
 (0)