openbmb/minicpm/minicpm5-finetune-unsloth
Claude Code and agent skill by openbmb/minicpm
- community
Checking that the SKILL.md file is still in the repository.
Fine-tune MiniCPM5-1B or MiniCPM5-2B with unsloth for tight-VRAM single-GPU LoRA / QLoRA. Use when the user wants "unsloth", "FastLanguageModel", QLoRA on a 24 GB consumer GPU, or asks for the smallest VRAM footprint.
Install
npx vskill@latest install openbmb/minicpm/minicpm5-finetune-unslothSKILL.md
The same SKILL.md was published earlier as openbmb/minicpm/minicpm5-finetune-unsloth.
Fine-tune MiniCPM5-1B and MiniCPM5-2B with unsloth
Single-GPU LoRA / QLoRA. Heavy custom kernels for memory savings (~2× reduction at 4-bit).
⚠️ Two install-time pins (read this BEFORE running):1. `transformers==4.57.3` — required if vLLM is in the same env (unsloth's vLLM coexistence patch only handles transformers ≤ 4.57.x).2. `torch==2.7.1` + `torchvision==0.22.1` —pip install unslothmay pull a cu13 torch wheel that fails on cu12.x drivers (cuda.is_available()returns False).```bashpip install --force-reinstall "torch==2.7.1" "torchvision==0.22.1" "transformers==4.57.3"```
Required input
| Var | Example | Default | |
|---|---|---|---|
BASE_MODEL | openbmb/MiniCPM5-2B | required; openbmb/MiniCPM5-1B also works | |
DATA | path to messages-format jsonl | required | |
OUTPUT_DIR | ./runs/minicpm5_unsloth | required | |
LOAD_IN_4BIT | True (QLoRA, lowest VRAM) / False (LoRA bf16) | False |
Steps
1. Install (once) — pin transformers to 4.57.3
🔑 `transformers==4.57.3` is required if vLLM is in the same env. unsloth's vLLM coexistence patch only handles transformers ≤ 4.57.x; if you skip this pin you'll get adataclasserror at import time.
2. Train — save as train_unsloth.py
3. Run
For QLoRA on a consumer GPU (24 GB or less), set LOAD_IN_4BIT=True.
4. Validate
You should see:
First iter is slow (~13 s, JIT compile); subsequent iters < 600 ms.
Inference
Merge for serving
Common pitfalls
- `RuntimeError: vLLM with version 0.10.x does not yet support transformers>=5.0.0`: pin
transformers==4.57.3(see install step). - `Unsloth: You must specify a formatting_func`: forgot
dataset_text_field="text"inSFTConfigAND/OR forgot to pre-tokenize messages → text column.
Reference
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/minicpm5-finetune-unsloth/SKILL.md
Popularity
- Repository stars
- 9,518
- Repository forks
- 625
- 7-day trend score
- 46
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openbmb/minicpm/minicpm5-finetune-unsloth)