文档
注册

单机多卡训练场景

本章节以OPT中caption任务的finetune功能为例,配置请参考MindSpore官方教程 单机多卡训练章节

修改模型启动脚本,将Python启动方式替换为微调工具包启动方式,修改后完整脚本参考链接

  • 原启动命令。
    python -u src/scripts/train_caption.py \
            --config=config/caption/$task_config_file \
            --pretrained_model_path=$pretrained_model_path \
            --output_path=$output_path/$task_name \
            --use_parallel=True \
            --data_path=$data_path &
  • 修改后启动命令。
    tk finetune \
           --quiet \
           --model_config_path $model_config_path \
           --boot_file_path $boot_file_path \
           --data_path $data_path \
           --output_path $output_path \
           --pretrained_model_path $pretrained_model_path &
    • “boot_file_path”为train脚本的绝对路径
    • “data_path”为数据集绝对路径
    • “model_config_path”为模型配置文件绝对路径,配置文件请参见模型配置文件
    • “output_path”为输出绝对路径
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词