vscode accelerate deepspeed配置

accelerate训练

bash 复制代码
{
    // 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训练

bash 复制代码
{
    // 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",
            ]   
        }
    ]
}
相关推荐
BestOrNothing_20152 小时前
Ubuntu 22.04 下调整 VS Code 界面及字体教程
linux·vscode·ubuntu22.04·界面调整
计算机安禾2 小时前
【C语言程序设计】第39篇:预处理器与宏定义
c语言·开发语言·c++·vscode·算法·visual studio code·visual studio
相思难忘成疾6 小时前
RHEL9 文件管理与 vi/vim 编辑操作实验
linux·编辑器·vim
进击的雷神6 小时前
Trae AI IDE 完全指南:从入门到精通
大数据·ide·人工智能·trae
北风toto7 小时前
IDEA模块名字和文件夹名字不一样的解决方式
java·ide·intellij-idea
im_AMBER7 小时前
万字长文:编辑器集成Vercel AI SDK
前端·人工智能·react.js·前端框架·编辑器
:1218 小时前
idea17创建tomcat项目(计网底层核心理解!)
java·ide·intellij-idea
猿小猴子8 小时前
主流 AI IDE 之一的 华为云码道「CodeArts」 介绍
ide·人工智能·ai·华为云
monsion18 小时前
OpenCode 学习指南
人工智能·vscode·架构
非鱼䲆鱻䲜19 小时前
vscode开发stm32添加新的头文件路径和包含源文件
ide·vscode·stm32·cmake·包含头文件·包含源文件