bailian-finetune

A command-line workflow for fine-tuning your own Alibaba Cloud Bailian models using text, audio, or image data. It validates and uploads training data, creates a training job, tracks it, exports a selected result, and can deploy the model as a service.

In plain words
What is it for?
Use it to prepare datasets, run supervised fine-tuning or preference-based training, monitor training jobs, choose a checkpoint, export the trained model, and deploy it.
Why use it?
It organizes the many steps involved in custom model training and helps catch invalid training data before a job starts. It also keeps progress, logs, checkpoints, and deployment in one workflow.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/modelstudioai/cli/bailian-finetune
Any agent
npx skills add modelstudioai/cli --skill bailian-finetune
Clone the repo
git clone --depth 1 https://github.com/modelstudioai/cli

Made for: Claude Code, Codex.

Per session 241 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,309 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00241 $0.01309
Opus 5 $0.00120 $0.00655
Sonnet 5 $0.00048 $0.00262
Haiku 4.5 $0.00024 $0.00131

Measured 3d ago against content hash aa003c09cea8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bailian-finetune scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bailian-finetune/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bailian fine-tuning pipeline (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 bl skill init; do not guess auth/consent.

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 --base-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-name my-model --display-name my-svc
  • Unsure which training methods a base model supports → bl finetune capability --base-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.

When to use which command

Intent Command
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

Read the full file on GitHub · 76 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 76 lines · 241 tokens per session scan A aa003c09cea8

Subscribe to this mod's changes

bailian-finetune is a skill published in the GitHub repository modelstudioai/cli (320 stars, last pushed 5d ago), licensed Apache-2.0. It adds 241 tokens to every session and 1,309 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

qianwen-text

Generate text, have conversations, write code, reason, and call functions with Qwen models. TRIGGER when: user asks to chat with Qwen, generate text, write code with Qwen, use Qwen function calling, or explicitly invokes this skill by name (e.g. use qianwen-text). DO NOT TRIGGER when: general coding questions without…

QianWen-AI/qianwen-ai · 111 tokens

qianwen-vision

Understand images and videos with Qwen vision models. TRIGGER when: user wants to analyze, describe, or extract information from images or videos, OCR text extraction, chart/table reading, visual reasoning, multi-image comparison, screenshot understanding, video comprehension, or explicitly invokes this skill by name…

QianWen-AI/qianwen-ai · 118 tokens

qianwen-model-selector

Recommend the best Qwen model and parameters. TRIGGER when: choosing between Qwen models, comparing Qwen model pricing, understanding Qwen model capabilities, checking usage or billing, viewing cost history, when an execution skill needs model selection advice, or user explicitly invokes this skill by name (e.g. use…

QianWen-AI/qianwen-ai · 101 tokens

agent-platform-deploy

Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a…

google/skills · 193 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens