You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I encountered an issue while integrating DeepSpeed. My code is written as follows:
`deepspeed_config_path = './deepspeed.json'
args = parse_arguments()
self.model, self.optimizer, _, _ = deepspeed.initialize(
args=args,
model=self.model,
training_data=trainset, # 传递训练数据
config=deepspeed_config_path
)and the content of my JSON file is as follows:{
"train_batch_size": 4,
"gradient_accumulation_steps": 1,
"optimizer": {
"type": "AdamW",
"params": {
"lr": 5.0e-4,
"weight_decay": 1.0e-5
}
},
"_comment": "scheduler定义的是学习率调度器.",
"scheduler": {
"type": "CosineAnnealingLR",
"params": {
"T_max": 10,
"eta_min": 5e-6
}
},
"fp16": {
"enabled": true
},
"_comment2": "选择zero2策略.",
"zero_optimization": {
"stage": 2
},
"gradient_clipping": 1.0,
"wall_clock_breakdown": true
}
`
However, when I run it, an error occurs. Could you please advise me on how to resolve this issue?
Thank you very much for your help!!!
The text was updated successfully, but these errors were encountered:
Hello, I encountered an issue while integrating DeepSpeed. My code is written as follows:
`deepspeed_config_path = './deepspeed.json'
args = parse_arguments()
self.model, self.optimizer, _, _ = deepspeed.initialize(
args=args,
model=self.model,
training_data=trainset, # 传递训练数据
config=deepspeed_config_path
)
and the content of my JSON file is as follows:
{"train_batch_size": 4,
"gradient_accumulation_steps": 1,
"optimizer": {
"type": "AdamW",
"params": {
"lr": 5.0e-4,
"weight_decay": 1.0e-5
}
},
"_comment": "scheduler定义的是学习率调度器.",
"scheduler": {
"type": "CosineAnnealingLR",
"params": {
"T_max": 10,
"eta_min": 5e-6
}
},
"fp16": {
"enabled": true
},
"_comment2": "选择zero2策略.",
"zero_optimization": {
"stage": 2
},
"gradient_clipping": 1.0,
"wall_clock_breakdown": true
}
`
However, when I run it, an error occurs. Could you please advise me on how to resolve this issue?
Thank you very much for your help!!!
The text was updated successfully, but these errors were encountered: