bailian-train-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese百炼模型训练→部署闭环 (bl
)
blBailian Model Training → Deployment Loop (bl
)
bl用百炼 CLI 把模型部署成可调用的专属推理服务——可以先微调再部署,也可以跳过训练直接部署基座。支持文本、音频 TTS 和图像生成三种模态,两处"等待"用 Monitor 异步轮询,不阻塞主流程。
bl链路 A(先训练后部署):
数据集 → finetune <模态> create → 等 SUCCEEDED → 导出模型(通常自动) → deploy <模态> create → 等 RUNNING → 调用
链路 B(直接部署基座,跳过训练):
选基座 → deploy <模态> create → 等 RUNNING → 调用链路 B 适用于"只想把某个基座跑成自己的部署服务"——和直接调用 API 在推理上没本质区别,但能拿到独立部署实例、可调速率/计费方式、纳入自己的运维。仅当用户明确表示不训练 / 跳过训练 / 直接部署基座时才走这条;用户只是没提训练细节时,默认按链路 A 引导,不要擅自跳过训练。
模态分发:本技能的通用流程适用于所有模态,但数据格式、超参、推理命令因模态而异。确定用户意图后,按模态查阅对应参考文件:
- 文本模型(对话/推理)→
references/text.md - 音频 TTS 模型(语音合成/CosyVoice)→
references/audio.md - 图像生成模型(文生图/图生图/Wan2.7)→
references/image.md - 未来新增模态 = 新增对应 reference 文件,本流程骨架不变
本技能假设(bailian-cli)已安装。命令/flag 细节以bl为准;本技能聚焦流程编排与避坑。bl <cmd> --help
Deploy models into callable exclusive inference services using Bailian CLI — you can fine-tune first then deploy, or deploy base models directly skipping training. Supports three modalities: text, audio TTS, and image generation. The two "waiting" steps use Monitor for asynchronous polling without blocking the main process.
blPipeline A (Train first then deploy):
Dataset → finetune <modal> create → Wait for SUCCEEDED → Export model (usually automatic) → deploy <modal> create → Wait for RUNNING → Inference
Pipeline B (Deploy base model directly, skip training):
Select base model → deploy <modal> create → Wait for RUNNING → InferencePipeline B applies to scenarios where you "just want to run a certain base model as your own deployment service" — there's no essential difference from directly calling the API for inference, but you get an independent deployment instance, adjustable rate/billing method, and can integrate it into your own O&M. Only use this pipeline when users explicitly state they don't want to train / skip training / deploy base models directly; when users only don't mention training details, guide them using Pipeline A by default, do not skip training without permission.
Modality Distribution: The general process of this skill applies to all modalities, but data formats, hyperparameters, and inference commands vary by modality. After confirming the user's intent, refer to the corresponding reference file by modality:
- Text Models (dialogue/inference) →
references/text.md - Audio TTS Models (speech synthesis/CosyVoice) →
references/audio.md - Image Generation Models (text-to-image/image-to-image/Wan2.7) →
references/image.md - Future new modalities = add corresponding reference files, the skeleton of this process remains unchanged
This skill assumes(bailian-cli) is already installed. For details on commands/flags, refer tobl; this skill focuses on process orchestration and pitfall avoidance.bl <cmd> --help
写操作护栏(创建前必读)
Write Operation Guardrails (Read Before Creation)
bl finetune <模态> createbl deploy <模态> createbl--dry-run- 预检代替 dry-run(创建前必跑,确认可行再写)。这些预检命令本身都需先通过下方前置检查的认证——未认证先 再预检:
bl auth login- 训练前:—— 确认基座支持你选的 training-type(不支持会快速失败且不耗配额;
bl finetune capability --model <base>提交时也会再校验一次)。create - 部署前:(链路 A 微调输出)或
bl deploy models --source custom(链路 B 基座)—— 确认目标模型可部署、看清可用 plan,再决定--source base。--plan - 复用检测:—— 若已有引用同一
bl deploy list --status RUNNING且 RUNNING 的部署,直接复用其finetuned_output,不要再建第二个计费实例。deployed_model
- 训练前:
- 计费确认硬闸门(mu/ptu):
- (默认,按 token 计费,闲置一般不计费)—— 安全默认,可直接创建。
lora - /
mu是预留/独占资源,闲置也计费——创建前必须向用户显式说明计费方式并取得确认。在 agent / CI 等非交互环境不能自动开通预留资源。命中 mu/ptu 时,把“这会产生闲置计费”连同命令交还给真人在终端确认(ptu当前不提供bl跳过确认 flag,确认行为完全由真人把控)。--yes
- 账号就绪检查:——
bl auth status即停,给authenticated: false。百炼走 API key / access token 认证,没有独立的实名闸门,bl auth login --api-key sk-...即账号就绪检查。auth status
bl finetune <modal> createbl deploy <modal> createbl--dry-run- Pre-check instead of dry-run (must run before creation, confirm feasibility before writing). These pre-check commands require authentication via the Pre-checks below — if not authenticated, run first then perform pre-checks:
bl auth login- Before training: — confirm that the base model supports the training-type you selected (if not supported, it will fail quickly without consuming quotas; the
bl finetune capability --model <base-model>submission will also validate this again).create - Before deployment: (fine-tuned output for Pipeline A) or
bl deploy models --source custom(base model for Pipeline B) — confirm that the target model can be deployed, check available plans, then decide on--source base.--plan - Reuse detection: — if there is already a running deployment referencing the same
bl deploy list --status RUNNING, directly reuse itsfinetuned_output, do not create a second billed instance.deployed_model
- Before training:
- Billing Confirmation Hard Gate (mu/ptu):
- (default, billed by token, generally no charge when idle) — safe default, can be created directly.
lora - /
muare reserved/exclusive resources, billed even when idle — before creation, must explicitly explain the billing method to the user and obtain confirmation. In non-interactive environments such as agents / CI, do not automatically enable reserved resources. When mu/ptu is involved, hand over the command along with "this will incur idle charges" to a human for confirmation in the terminal (currentlyptudoes not provide ablflag to skip confirmation, and confirmation is fully controlled by humans).--yes
- Account Readiness Check: — stop if
bl auth status, provideauthenticated: false. Bailian uses API key / access token for authentication, there is no separate real-name verification gate,bl auth login --api-key sk-...serves as the account readiness check.auth status
反触发表(不归本 skill 的意图,附完整命令)
Anti-Trigger List (Intents Not Covered by This Skill, with Complete Commands)
| 用户意图 | 路由到 | 完整示范命令 |
|---|---|---|
| 只想试模型效果 / 一次性对话 | | |
| 已确定模型,只要调用方式 | | |
| 不知道选哪个基座 / 模型选型 | | (让该 skill 按场景推荐) |
| 纯查模型参数 / 价格 / 上下文窗口 | | (查模型数据目录) |
| 已有部署,只想生成调用示例 | | |
| 对已有训练任务 / 部署做查删(生命周期) | | |
本 skill 只负责"新建训练任务 + 新建部署 + 调用交付"这一条闭环。训练任务与部署的全生命周期管理(list / stop / delete 历史任务、删除部署等)不在本 skill 流程内,用/bl finetune list/bl deploy list直接操作。bl deploy delete
| User Intent | Route to | Complete Example Command |
|---|---|---|
| Just want to test model performance / one-time dialogue | | |
| Model is confirmed, only need inference methods | | |
| Don't know which base model to choose / model selection | | (Let that skill recommend based on scenarios) |
| Purely check model parameters / price / context window | | (Check model data directory) |
| Deployment already exists, only need to generate inference examples | | |
| Query/delete existing training tasks / deployments (lifecycle management) | Directly use | |
This skill only handles the closed loop of "create new training task + create new deployment + deliver inference". Full lifecycle management of training tasks and deployments (list / stop / delete historical tasks, delete deployments, etc.) is not within the scope of this skill; use/bl finetune list/bl deploy listfor direct operations.bl deploy delete
反幻觉清单
Anti-Hallucination Checklist
- 在不同命令里含义不同,切勿复用:
--model- → 基座模型名(文本
bl finetune <模态> create --model,音频qwen3-8b,图像cosyvoice-v3-flash)。wan2.7-image-pro - → 导出模型名(链路 A:
bl deploy <模态> create --model/qwen3-8b-ft-.../cosyvoice-v3-flash-ft-...;链路 B:基座名)。wan2.7-image-pro-ft-... - 推理命令 → 必须用
--model响应里的deploy <模态> create,不是你传给 deploy <模态> create 的名字。deployed_model
- 取值穷举:
--training-type/sft(默认)/sft-lora/dpo/dpo-lora。映射在 CLI 边界完成(cpt→sft-lora),永远传 CLI 值,不要传服务端字符串。efficient_sft无cpt变体。音频 TTS 和图像生成都只用-lora——sft-lora/finetune audio create不暴露此 flag,仅finetune image create接受。finetune text create - 取值穷举:
--plan(默认,token 计费)/lora(需ptu/--input-tpm)/--output-tpm(需mu/--deploy-spec)。链路 B 基座通常不支持--capacity。音频 TTS 微调模型只支持lora。图像生成微调模型只支持mu。lora - (非
--deploy-spectemplate-id):mu plan 的部署规格 flag。CLI 从 catalog 读取,在请求体中发送为template_id。deploy_spec - 取值穷举(
--source):bl deploy models(微调输出)/custom(基座)/base。public - 必须字符串:传
--learning-rate,不要传数字"3e-4",避免 JSON 精度丢失(文本适用,音频/图像不需要传此参数)。3e-4 - 推理命令因模态不同:文本模型用 ,音频 TTS 用
bl text chat,图像生成用异步 API + 触发词(详见bl speech synthesize --voice default)。references/image.md - 没有这些 flag/子命令:无
bl、无裸--dry-run/finetune create(必须带模态段:deploy create、finetune text|audio|image create)、无deploy text|audio|image create、无finetune start(CLI 暂无 stop 命令,RUNNING 的 mu/ptu 需到控制台停用)。deploy stop - 必填:的
finetune <模态> create/--model;--datasets的deploy <模态> create/--model。--name
- has different meanings in different commands, do not reuse it:
--model- → Base model name (text
bl finetune <modal> create --model, audioqwen3-8b, imagecosyvoice-v3-flash).wan2.7-image-pro - → Exported model name (Pipeline A:
bl deploy <modal> create --model/qwen3-8b-ft-.../cosyvoice-v3-flash-ft-...; Pipeline B: base model name).wan2.7-image-pro-ft-... - Inference command → Must use
--modelfrom the response ofdeployed_model, not the name you passed to deploy <modal> create.deploy <modal> create
- values are exhaustive:
--training-type/sft(default) /sft-lora/dpo/dpo-lora. Mapping is completed at the CLI boundary (cpt→sft-lora), always pass CLI values, do not pass server-side strings.efficient_sfthas nocptvariant. Audio TTS and image generation only use-lora—sft-lora/finetune audio createdo not expose this flag, onlyfinetune image createaccepts it.finetune text create - values are exhaustive:
--plan(default, billed by token) /lora(requiresptu/--input-tpm) /--output-tpm(requiresmu/--deploy-spec). Base models in Pipeline B usually do not support--capacity. Audio TTS fine-tuned models only supportlora. Image generation fine-tuned models only supportmu.lora - (not
--deploy-spectemplate-id): Deployment specification flag for mu plan. The CLI readsfrom the catalog and sends it astemplate_idin the request body.deploy_spec - values are exhaustive (
--source):bl deploy models(fine-tuned output) /custom(base model) /base.public - must be a string: Pass
--learning-rate, do not pass the number"3e-4"to avoid JSON precision loss (applies to text models, not required for audio/image).3e-4 - Inference commands vary by modality: Use for text models,
bl text chatfor audio TTS models, and asynchronous API + trigger words for image generation (seebl speech synthesize --voice default).references/image.md - These flags/subcommands do not exist: has no
bl, no bare--dry-run/finetune create(must include modality segment:deploy create,finetune text|audio|image create), nodeploy text|audio|image create, nofinetune start(CLI has no stop command yet, running mu/ptu instances need to be disabled in the console).deploy stop - Required parameters: /
--modelfor--datasets;finetune <modal> create/--modelfor--name.deploy <modal> create
前置检查(动作流起点)
Pre-checks (Start of Action Flow)
- 认证:,确认已配置 API key(
bl auth status或DASHSCOPE_API_KEY)。bl auth login --api-key sk-... - 基座选型:查询训练能力用 (查 listFoundationModels,走 API key、无需 console 登录):
bl finetune capability- —— 该模型支持哪些训练类型。
bl finetune capability --model <base> - —— 反向查:哪些模型支持该训练类型(返回
bl finetune capability --training-type sft-lora列表,含中文名)。models - 选定基座后可直接进入第 2 步;提交前也会再用 listFoundationModels 校验,不支持会快速失败。
bl finetune <模态> create - 文本推理推荐 Qwen3 系列(/
qwen3-8b/qwen3-14b);音频 TTS 用qwen3.6-flash;图像生成用cosyvoice-v3-flash/wan2.7-image-pro。wan2.7-image
- Authentication: , confirm API key is configured (
bl auth statusorDASHSCOPE_API_KEY).bl auth login --api-key sk-... - Base model selection: Query training capabilities with (queries listFoundationModels, uses API key, no console login required):
bl finetune capability- — which training types are supported by this model.
bl finetune capability --model <base-model> - — reverse query: which models support this training type (returns
bl finetune capability --training-type sft-loralist with Chinese names).models - After selecting a base model, you can directly proceed to Step 2; will also validate with listFoundationModels before submission, and will fail quickly if not supported.
bl finetune <modal> create - Recommended text inference models are Qwen3 series (/
qwen3-8b/qwen3-14b); useqwen3.6-flashfor audio TTS; usecosyvoice-v3-flash/wan2.7-image-profor image generation.wan2.7-image
第 1 步:准备数据集
Step 1: Prepare Dataset
支持三种数据来源,由你(Agent)根据用户意图灵活选用,不必写死交互流程——你本身具备主动提问能力,知道有哪些选项后自然向用户确认即可:
- 本地数据集 —— 用户提供本地文件路径,直接使用。
- 已上传数据集 —— 从百炼上已有的数据集中选取()。
bl dataset list - 生成示例数据 —— 征得用户同意后,由你生成一份小规模示例数据,仅用于跑通流程(效果有限,需如实告知用户)。
数据格式因模态不同,详见对应参考文件:
- 文本模型:文件(ChatML/DPO/CPT schema),详见
.jsonl。references/text.md - 音频 TTS:包(内含
.zip+data.jsonl),详见train/*.wav。references/audio.md - 图像生成:包(内含
.zip+ 图像文件平铺),详见data.jsonl。references/image.md
提交训练前用 校验通过再继续(CLI 自动探测 schema,也可 / / 显式指定)。
bl dataset validate --file <path>--schema tts--schema image--schema chatmlSupports three data sources, you (Agent) can flexibly choose based on user intent, do not hardcode the interaction process — you have the ability to ask questions proactively, so naturally confirm with users after knowing the options:
- Local Dataset — User provides local file path, use directly.
- Uploaded Dataset — Select from existing datasets on Bailian ().
bl dataset list - Generate Sample Data — With user consent, generate a small-scale sample data only for running through the process (limited effect, need to inform users truthfully).
Data format varies by modality, see corresponding reference files:
- Text Models: files (ChatML/DPO/CPT schema), see
.jsonl.references/text.md - Audio TTS: package (contains
.zip+data.jsonl), seetrain/*.wav.references/audio.md - Image Generation: package (contains
.zip+ flat image files), seedata.jsonl.references/image.md
Before submitting training, run to pass validation before proceeding (CLI automatically detects schema, you can also explicitly specify with / / ).
bl dataset validate --file <path>--schema tts--schema image--schema chatml第 2 步:创建微调任务
Step 2: Create Fine-tuning Task
bash
bl finetune <模态> create \
--model <base-model> \
--datasets <path-or-file-id> \
--output jsontraining-type 取值与映射详见 。模态特异性超参见对应参考文件:
references/finetune.md- 文本模型():接受
finetune text create/--training-type/--n-epochs等,详见--learning-rate。references/text.md - 音频 TTS():不暴露
finetune audio create(内部固定--training-type),超参由 CLI 自动注入,详见sft-lora。references/audio.md - 图像生成():不暴露
finetune image create(内部固定--training-type),超参由 CLI 自动注入,详见sft-lora。references/image.md
从响应记下:、(输出模型名,形如 )。
output.job_idoutput.finetuned_output<base>-ft-<ts>-<id>bash
bl finetune <modal> create \
--model <base-model> \
--datasets <path-or-file-id> \
--output jsontraining-type values and mapping see . Modality-specific hyperparameters see corresponding reference files:
references/finetune.md- Text models (): Accept
finetune text create/--training-type/--n-epochs, etc., see--learning-rate.references/text.md - Audio TTS (): Does not expose
finetune audio create(internally fixed to--training-type), hyperparameters are automatically injected by CLI, seesft-lora.references/audio.md - Image generation (): Does not expose
finetune image create(internally fixed to--training-type), hyperparameters are automatically injected by CLI, seesft-lora.references/image.md
Record from the response: , (exported model name, in the format ).
output.job_idoutput.finetuned_output<base>-ft-<ts>-<id>第 3 步:等待训练完成(异步)
Step 3: Wait for Training Completion (Asynchronous)
用 Monitor 工具运行本技能自带的等待脚本——它会在状态变化时通知,到终态退出:
Monitor command: bash <本技能目录>/scripts/wait.sh finetune <JOB_ID><本技能目录>scripts/wait.shSUCCEEDEDFAILEDCANCELEDPARTIALLY_SUCCEEDED⚠️ 避坑:不要在 zsh 里手写 轮询循环。 是 zsh 的只读内置变量,赋值会报 并让脚本 exit 1。用本技能的 bash 脚本()规避,或自写时改用 等变量名。
status=...statusread-only variable#!/usr/bin/env bashstUse the Monitor tool to run the built-in waiting script of this skill — it will notify when status changes and exit when reaching terminal state:
Monitor command: bash <skill-directory>/scripts/wait.sh finetune <JOB_ID><skill-directory>scripts/wait.shSUCCEEDEDFAILEDCANCELEDPARTIALLY_SUCCEEDED⚠️ Pitfall Avoidance: Do not write a manual polling loop in zsh. is a read-only built-in variable in zsh, assigning it will report and exit the script with code 1. Use the bash script of this skill () to avoid this, or use variable names like when writing your own.
status=...statusread-only variable#!/usr/bin/env bashst第 4 步:导出最佳模型(通常可跳过)
Step 4: Export Best Model (Usually Skippable)
任务 SUCCEEDED 后,平台会自动导出 best checkpoint 为可部署模型——直接进第 5 步即可,无需手动导出。
只有要部署非 best 的某个 checkpoint 时才显式导出:
bash
bl finetune checkpoints --job-id <JOB_ID> # 列出可用 checkpoint
bl finetune export --job-id <JOB_ID> --checkpoint <name> --model-name <自定义名>After the task is SUCCEEDED, the platform will automatically export the best checkpoint as a deployable model — you can directly proceed to Step 5 without manual export.
Only explicitly export when you need to deploy a non-best checkpoint:
bash
bl finetune checkpoints --job-id <JOB_ID> # List available checkpoints
bl finetune export --job-id <JOB_ID> --checkpoint <name> --model-name <custom-name>第 5 步:创建部署
Step 5: Create Deployment
创建前先过写操作护栏:查是否已有同模型部署可复用;bl deploy list --status RUNNING确认可用 plan;bl deploy models --source custom|base/mu必须先取得用户计费确认。ptu
⚠️ 关键避坑:微调后的模型不能直接用微调输出名调用,会 404 。必须先创建部署。(链路 B 部署基座同理——直接调用走的是公共推理,不经过你的部署实例。)
Model not existbash
bl deploy <模态> create \
--model <model-name> \ # 微调输出名(链路A) 或基座名(链路B)
--name <display-name> \
--plan <lora|ptu|mu> \ # 见下方说明
--output json- 模态段(/
text/audio)须与部署模型模态匹配;三个模态子命令 flag 完全相同。image - :链路 A 传第 2 步的
--model;链路 B 直接传基座模型名。finetuned_output - :
--plan- 文本微调模型默认 (token 计费),也可用
lora。mu - 音频 TTS 微调模型只支持 (不支持
mu/lora),需ptu+--deploy-spec。--capacity - 图像生成微调模型只支持 (不支持
lora/mu)。ptu - 链路 B 基座通常只支持 /
ptu,不支持mu。lora - 各 plan 必填参数与计费细则见 。
references/deploy.md
- 文本微调模型默认
- :mu plan 的部署规格(如
--deploy-spec),省略时自动从 catalog 匹配。dps-20260521172224-1vabse - 不确定支持哪些 plan:链路 A 用 ,链路 B 用
bl deploy models --source custom,按返回的bl deploy models --source base选。plans
⚠️ 避坑(最高频错误): 在 与推理命令里含义不同—— 传导出模型名,响应返回的 才是部署实例 id,推理命令 必须用 ,不要复用。详见 。
--modeldeploy <模态> createdeploy <模态> create --modeloutput.deployed_model--modeldeployed_modelreferences/deploy.md从响应记下:。
output.deployed_modelBefore creation, pass the Write Operation Guardrails:to check if there is an existing deployment of the same model that can be reused;bl deploy list --status RUNNINGto confirm available plans;bl deploy models --source custom|base/mumust obtain user billing confirmation first.ptu
⚠️ Critical Pitfall: Fine-tuned models cannot be directly called using the fine-tuned output name, it will return 404 . You must create a deployment first. (Same for deploying base models in Pipeline B — direct calling uses public inference and does not go through your deployment instance.)
Model not existbash
bl deploy <modal> create \
--model <model-name> \ # Fine-tuned output name (Pipeline A) or base model name (Pipeline B)
--name <display-name> \
--plan <lora|ptu|mu> \ # See explanation below
--output json- Modality segment (/
text/audio) must match the modality of the deployed model; the flags of the three modality subcommands are identical.image - : Pass
--modelfrom Step 2 for Pipeline A; directly pass the base model name for Pipeline B.finetuned_output - :
--plan- Default (billed by token) for text fine-tuned models,
lorais also available.mu - Audio TTS fine-tuned models only support (do not support
mu/lora), requireptu+--deploy-spec.--capacity - Image generation fine-tuned models only support (do not support
lora/mu).ptu - Base models in Pipeline B usually only support /
ptu, do not supportmu.lora - Required parameters and billing details for each plan see .
references/deploy.md
- Default
- : Deployment specification for mu plan (e.g.,
--deploy-spec), automatically matched from the catalog if omitted.dps-20260521172224-1vabse - Unsure which plans are supported: Use for Pipeline A,
bl deploy models --source customfor Pipeline B, select from the returnedbl deploy models --source base.plans
⚠️ Top-Frequency Error Pitfall: has different meanings in and inference commands — passes the exported model name, returned in the response is the deployment instance ID, and the inference command must use , do not reuse the exported model name. See .
--modeldeploy <modal> createdeploy <modal> create --modeloutput.deployed_model--modeldeployed_modelreferences/deploy.mdRecord from the response: .
output.deployed_model第 6 步:等待部署就绪(异步)
Step 6: Wait for Deployment Readiness (Asynchronous)
Monitor command: bash <本技能目录>/scripts/wait.sh deploy <DEPLOYED_MODEL><本技能目录>RUNNINGFAILEDSTOPPED⚠️ 避坑:状态传播延迟。 部署刚到 时立即调用,可能短暂返回 404 ——这是服务端状态传播延迟,不是用错模型名。 也可能还显示 。约 1 分钟内会稳定,遇 404 等十几秒重试即可;若持续 404,先核对用的是 而非微调输出名。
RUNNINGModel not existbl deploy getPENDINGdeployed_modelMonitor command: bash <skill-directory>/scripts/wait.sh deploy <DEPLOYED_MODEL><skill-directory>RUNNINGFAILEDSTOPPED⚠️ Pitfall Avoidance: Status Propagation Delay. Immediately calling the model when deployment just reaches may briefly return 404 — this is server-side status propagation delay, not an incorrect model name. may also still show . It will stabilize within about 1 minute; if you encounter 404, wait ten seconds and retry; if it persists, first check if you are using instead of the fine-tuned output name.
RUNNINGModel not existbl deploy getPENDINGdeployed_model第 7 步:调用与交付
Step 7: Inference and Delivery
推理命令因模态不同:
文本模型:
bash
bl text chat --model <DEPLOYED_MODEL> --message "你的问题"音频 TTS 模型:
bash
bl speech synthesize --model <DEPLOYED_MODEL> --voice default --text "你要合成的文本" --out result.mp3图像生成模型(异步 API,需触发词):
bash
undefinedInference commands vary by modality:
Text models:
bash
bl text chat --model <DEPLOYED_MODEL> --message "Your question"Audio TTS models:
bash
bl speech synthesize --model <DEPLOYED_MODEL> --voice default --text "Text you want to synthesize" --out result.mp3Image generation models (asynchronous API, requires trigger words):
bash
undefined详见 references/image.md —— 需 X-DashScope-Async 头 + prompt 含触发词
See references/image.md — requires X-DashScope-Async header + prompt containing trigger words
> `--model` 必须用 `deploy <模态> create` 响应中的 `deployed_model`,**不是**微调输出名。音频 TTS 的 `--voice` 固定为 `default`。图像生成需异步调用且 prompt 包含触发词。详见对应模态参考文件。
向用户交付时给出:
- **部署实例 id**(`deployed_model`)——调用用它,不是微调输出名
- 一条可直接运行的推理示例命令
- 常用运维命令:`bl deploy get --deployed-model <id>` 查状态;`bl deploy delete --deployed-model <id>` 删除部署;`bl finetune list` 查历史任务。
> `--model` must use `deployed_model` from the response of `deploy <modal> create`, **not** the fine-tuned output name. `--voice` for audio TTS is fixed to `default`. Image generation requires asynchronous calling and prompts containing trigger words. See corresponding modality reference files.
When delivering to users, provide:
- **Deployment instance ID** (`deployed_model`) — use this for inference, not the fine-tuned output name
- One directly executable inference example command
- Common O&M commands: `bl deploy get --deployed-model <id>` to check status; `bl deploy delete --deployed-model <id>` to delete deployment; `bl finetune list` to check historical tasks.收尾提示
Closing Tips
- 闲置计费与删除:闲置一般不计费;
lora/mu闲置也计费,不用要清理,且ptu有状态约束(CLI 无 stop 命令)。细则见bl deploy delete。references/deploy.md - 复用数据集:多次训练同一数据时,先 拿 file-id,再用
bl dataset upload避免重复上传。--datasets <file-id> - 效果不好:优先加数据(量与质量),其次调 /
n-epochs,最后才考虑全参learning-rate。小数据集(<100 条)效果上限有限,要管理预期。sft
- Idle Charges and Deletion: generally has no charge when idle;
lora/muare charged even when idle, clean them up when not in use, andptuhas status constraints (CLI has no stop command). Details seebl deploy delete.references/deploy.md - Reuse Datasets: When training with the same data multiple times, first run to get a file-id, then use
bl dataset uploadto avoid repeated uploads.--datasets <file-id> - Poor Performance: Prioritize adding data (quantity and quality), then adjust /
n-epochs, and finally consider full-parameterlearning-rate. Small datasets (<100 entries) have limited performance upper limits, manage expectations accordingly.sft