fix: use SHARD_GRAD_OP instead of FULL_SHARD for 2-GPU setup
This commit is contained in:
6
train.py
6
train.py
@@ -169,12 +169,14 @@ def train(config_path):
|
||||
# gradient_checkpointing removed - FSDP activation_checkpointing handles it
|
||||
fsdp=True,
|
||||
fsdp_config={
|
||||
"sharding_strategy": "SHARD_GRAD_OP",
|
||||
"cpu_offload": False,
|
||||
"activation_checkpointing": True,
|
||||
"limit_all_gathers": True,
|
||||
"backward_prefetch": "backward_pre",
|
||||
"forward_prefetch": "true",
|
||||
"cpu_offload": "false",
|
||||
"auto_wrap_policy": "TRANSFORMER_BASED_WRAP",
|
||||
"transformer_layer_cls_to_wrap": "Qwen3_5MoeDecoderLayer",
|
||||
"activation_checkpointing": True,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user