bailian-finetune

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Bailian fine-tuning pipeline (
bl dataset
/
bl finetune
/
bl deploy
)

百炼模型精调流程(
bl dataset
/
bl finetune
/
bl deploy

CRITICAL — Before executing, MUST read the shared protocol in
../bailian-protocol/SKILL.md
: Version & updates (pre-flight checklist), Setup & auth, and CLI errors: report an issue. Command details are authoritative in
reference/
(dataset / finetune / deploy) and
bl <command> --help
— do not guess flags. The whole pipeline requires an API key. If that protocol file is missing, stop and run
npx skills add modelstudioai/cli --all -g
; do not guess auth/consent.
重要提示 — 执行前必须阅读
../bailian-protocol/SKILL.md
中的共享协议:版本与更新(预检清单)、设置与认证,以及CLI错误上报方式。命令详情以
reference/
(dataset / finetune / deploy)和
bl <command> --help
为准,请勿猜测参数。整个流程需要 API key。若缺少该协议文件,请停止操作并执行
npx skills add modelstudioai/cli --all -g
,请勿自行尝试认证/授权。

End-to-end workflow (follow in order)

端到端工作流(按顺序执行)

1. Validate data   bl dataset validate --file train.jsonl [--schema chatml|dpo|cpt|tts|image]
2. Upload data     bl dataset upload --file train.jsonl          # returns a file-id
3. Create job      bl finetune text|audio|image create --model <base> --datasets <file-id|path>
4. Watch progress  bl finetune watch --job-id ft-xxx             # or get / logs
5. Pick artifact   bl finetune checkpoints --job-id ft-xxx
6. Export model    bl finetune export --job-id ft-xxx --checkpoint ckpt-N --model-name my-model
7. Deploy service  bl deploy text|audio|image create --model my-model --name my-svc
  • Unsure which training methods a base model supports →
    bl finetune capability --model <base>
    or
    --training-type sft|sft-lora|dpo|cpt
    .
  • Text
    --training-type
    values:
    sft
    /
    sft-lora
    /
    dpo
    /
    dpo-lora
    /
    cpt
    . Audio bases include
    cosyvoice-v3-flash
    ; image bases include
    wan2.7-image-pro
    .
  • Deployment plans: audio defaults to
    --plan mu
    ; text/image default to
    lora
    .
  • Preview write operations (create / delete / cancel / scale) with
    --dry-run
    first, and confirm with the user before deleting a job or dataset.
1. 校验数据   bl dataset validate --file train.jsonl [--schema chatml|dpo|cpt|tts|image]
2. 上传数据     bl dataset upload --file train.jsonl          # 返回 file-id
3. 创建任务      bl finetune text|audio|image create --model <base> --datasets <file-id|path>
4. 查看进度  bl finetune watch --job-id ft-xxx             # 或使用 get / logs 命令
5. 选择产物   bl finetune checkpoints --job-id ft-xxx
6. 导出模型    bl finetune export --job-id ft-xxx --checkpoint ckpt-N --model-name my-model
7. 部署服务  bl deploy text|audio|image create --model my-model --name my-svc
  • 不确定基础模型支持哪种训练方式 → 执行
    bl finetune capability --model <base>
    --training-type sft|sft-lora|dpo|cpt
  • 文本类
    --training-type
    参数值:
    sft
    /
    sft-lora
    /
    dpo
    /
    dpo-lora
    /
    cpt
    。音频类基础模型包含
    cosyvoice-v3-flash
    ;图像类基础模型包含
    wan2.7-image-pro
  • 部署方案:音频默认使用
    --plan mu
    ;文本/图像默认使用
    lora
  • 写操作(创建 / 删除 / 取消 / 扩容)请先使用
    --dry-run
    预览,删除任务或数据集前需与用户确认。

When to use which command

命令适用场景

IntentCommand
Validate / upload training data
bl dataset validate
/
upload
(
.jsonl
or
.zip
)
Dataset list / detail / delete
bl dataset list
/
get
/
delete
Create a fine-tuning job
bl finetune text|audio|image create
Job list / detail / follow
bl finetune list
/
get
/
watch
/
logs
Artifacts and export
bl finetune checkpoints
/
export
Cancel / delete a job
bl finetune cancel
/
delete
Trainable capability lookup
bl finetune capability
Deploy / lifecycle
bl deploy text|audio|image create
,
list
/
get
/
update
/
scale
/
delete
/
models
Flags, usage, and examples: see
reference/
or
bl <command> --help
— do not guess flags.
需求命令
校验/上传训练数据
bl dataset validate
/
upload
(支持
.jsonl
.zip
格式)
数据集列表/详情/删除
bl dataset list
/
get
/
delete
创建精调任务
bl finetune text|audio|image create
任务列表/详情/跟踪
bl finetune list
/
get
/
watch
/
logs
产物与导出
bl finetune checkpoints
/
export
取消/删除任务
bl finetune cancel
/
delete
可训练能力查询
bl finetune capability
部署/生命周期管理
bl deploy text|audio|image create
,
list
/
get
/
update
/
scale
/
delete
/
models
参数、用法及示例请查看
reference/
bl <command> --help
,请勿猜测参数。

Quick examples

快速示例

bash
bl dataset validate --file train.jsonl
bl dataset upload --file train.jsonl
bl finetune text create --model qwen3-8b --training-type sft-lora --datasets file-xxx
bl finetune watch --job-id ft-xxx
bl finetune export --job-id ft-xxx --checkpoint ckpt-3 --model-name my-qwen-sft
bl deploy text create --model my-qwen-sft --name my-svc
bash
bl dataset validate --file train.jsonl
bl dataset upload --file train.jsonl
bl finetune text create --model qwen3-8b --training-type sft-lora --datasets file-xxx
bl finetune watch --job-id ft-xxx
bl finetune export --job-id ft-xxx --checkpoint ckpt-3 --model-name my-qwen-sft
bl deploy text create --model my-qwen-sft --name my-svc

Common hand-offs

常见转接场景

软 hand-off(按 skill ;已安装则 Read,否则
--help
/ 提示
npx skills add modelstudioai/cli --all -g
):
  • After deployment, try the model or generate content → skill
    bailian-gen
    (media) or
    bl text chat
    (fallback:
    bl image\|video\|text --help
    ).
  • Unsure which base model to pick →
    bailian-model-recommend
    /
    bl advisor recommend
    .
  • Training quota / usage questions → skill
    bailian-cli
    (fallback:
    bl quota
    /
    bl usage --help
    ).
软转接(按 skill 名称;已安装则查看文档,否则使用
--help
/ 提示执行
npx skills add modelstudioai/cli --all -g
):
  • 部署完成后,测试模型或生成内容 → 使用 skill
    bailian-gen
    (多媒体)或
    bl text chat
    (备选:
    bl image\|video\|text --help
    )。
  • 不确定选择哪个基础模型 → 使用
    bailian-model-recommend
    /
    bl advisor recommend
  • 训练配额/使用量相关问题 → 使用 skill
    bailian-cli
    (备选:
    bl quota
    /
    bl usage --help
    )。

references

参考资料

  • bailian-protocol — shared protocol (install via
    --all -g
    )
  • reference/ — command details
  • bailian-protocol — 共享协议(通过
    --all -g
    安装)
  • reference/ — 命令详情