MiniCPM5-15B-A2.5B
MiniCPM Text Series
Fine-tuning Cookbooks and Agent Skills
MiniCPM5-15B-A2.5B uses a sparse MoE architecture (minicpm5_moe) that is natively integrated into the latest Transformers. To help developers quickly reproduce the fine-tuning workflow, we provide single-page cookbooks, each paired with a matching Agent Skill.
Cookbook: For running the steps manually. Agent Skills: For use in coding agents such as Cursor / Claude Code, where the agent chooses an execution path based on the training framework, hardware and data path.
Top-level Skill
MiniCPM5-15B-A2.5B Finetune Skill (automatically routes to trl · llamafactory · ms-swift · unsloth)
After placing this Skill in your project directory, you can enter the following in a coding agent such as Cursor / Claude Code:
@minicpm5-15b-a2p5b-finetune Fine-tune on /data/my_chat.jsonl with LLaMA-Factory + LoRA, output to ./out
The agent reads the top-level Skill, selects the matching sub-Skill and cookbook based on the target framework, hardware and data path, then runs the commands and reports the results.
Fine-tuning Frameworks
| Framework | Use case | Cookbook | Agent Skill |
|---|---|---|---|
| TRL + PEFT | Script-based LoRA / SFT with assistant-only loss | Get it | Get it |
| LLaMA-Factory | YAML-driven LoRA / full SFT | Get it | Get it |
| ms-swift | ModelScope-native command-line LoRA / full SFT | Get it | Get it |
| Unsloth | Single-GPU LoRA, or QLoRA for the lowest memory use | Get it | Get it |
Hardware reference: All four frameworks can train a LoRA adapter on a single 80 GB GPU (about 40 GiB); QLoRA takes roughly half of that. Full SFT needs eight GPUs, at about 35–66 GiB per GPU depending on the ZeRO stage.
LLaMA-Factory, Unsloth and ms-swift pin older Transformers releases that do not include minicpm5_moe. Download the checkpoint locally and copy in the compatibility model code first, then use the local directory as the model path instead of a Hugging Face model id. TRL can skip this step when running on the latest Transformers.
Parameter names, data formats and dependency versions vary across frameworks. Before running, open the corresponding cookbook and choose a configuration that fits your hardware and training goal.