MiniCPM5-2B
MiniCPM Text Series
Fine-tuning Cookbooks and Agent Skills
MiniCPM5-2B uses the standard LlamaForCausalLM architecture, so mainstream fine-tuning frameworks can load it directly — no custom kernels and no forked model code. 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 Finetune Skill (automatically routes to trl · llamafactory · ms-swift · unsloth)
After downloading this Skill and placing it in your current project directory, you can enter the following in a coding agent such as Cursor / Claude Code:
@minicpm5-finetune 使用 Unsloth + LoRA 微调 /data/my_chat.jsonl,输出到 ./out
The agent reads the top-level Skill, selects the corresponding 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 | Matching Agent Skill |
|---|---|---|---|
| TRL + PEFT | LoRA / SFT fine-tuning | Get it | Get it |
| LLaMA-Factory | Visual configuration and general-purpose fine-tuning | Get it | Get it |
| ms-swift | Fine-tuning in the ModelScope ecosystem | Get it | Get it |
| Unsloth | Low-VRAM, high-efficiency LoRA fine-tuning | Get it | Get it |
Parameter names, data formats and dependency versions differ between frameworks. Before running anything, open the corresponding Cookbook and choose a configuration based on your current hardware and training goals.