vscode accelerate deepspeed配置
·
accelerate训练
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
// "program": "${file}",
"module": "accelerate.commands.launch",
"console": "integratedTerminal",
"env": {
"CUDA_VISIBLE_DEVICES": "4,5,6,7" // 与
},
"args": [
//// train sdxl lora
"--num_processes=4",
"examples/text_to_image/train_text_to_image_lora_sdxl.py",
"--dataset_name","lambdalabs/naruto-blip-captions",
"--output_dir","exp",
"--resolution","1024", "--random_flip",
"--train_batch_size","1",
"--num_train_epochs","2", "--checkpointing_steps","500",
"--learning_rate","1e-04", "--lr_scheduler","constant", "--lr_warmup_steps","0",
"--mixed_precision","fp16",
"--seed","42",
"--output_dir","sd-naruto-model-lora-sdxl",
"--validation_prompt","cute dragon creature",
]
}
]
}
accelerate+deepspeed训练
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
// "program": "${file}",
"module": "accelerate.commands.launch",
"console": "integratedTerminal",
"env": {
"CUDA_VISIBLE_DEVICES": "4,5,6,7"
},
"args": [
//// train sdxl lora
"--config_file","my/deepspeed_config/default_config.yaml", //跟上面只有这个区别
"--num_processes=4",
"examples/text_to_image/train_text_to_image_lora_sdxl.py",
"--dataset_name","lambdalabs/naruto-blip-captions",
"--output_dir","exp",
"--resolution","1024", "--random_flip",
"--train_batch_size","1",
"--num_train_epochs","2", "--checkpointing_steps","500",
"--learning_rate","1e-04", "--lr_scheduler","constant", "--lr_warmup_steps","0",
"--mixed_precision","fp16",
"--seed","42",
"--output_dir","sd-naruto-model-lora-sdxl",
"--validation_prompt","cute dragon creature",
]
}
]
}
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)