Skip to content
Development
Skill

/unsloth-buddy

This skill should be used when users want to fine-tune language models or perform reinforcement learning (SFT, DPO, GRPO, ORPO, KTO, SimPO) using the highly optimized Unsloth library. Covers environment setup, LoRA patching, VRAM optimization, vision/multimodal fine-tuning, TTS,

From plugin
unsloth-buddy
2691 skill
Install
$ npx -y skills add TYH-labs/unsloth-buddy --skill unsloth-buddy --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/unsloth-buddy

Context preview

The summary Claude sees to decide when to auto-load this skill.

This skill should be used when users want to fine-tune language models or perform reinforcement learning (SFT, DPO, GRPO, ORPO, KTO, SimPO) using the highly optimized Unsloth library. Covers environment setup, LoRA patching, VRAM optimization, vision/multimodal fine-tuning, TTS,

SKILL.md

unsloth-buddy.SKILL.md
name: unsloth-buddy
description: This skill should be used when users want to fine-tune language models or perform reinforcement learning (SFT, DPO, GRPO, ORPO, KTO, SimPO) using the highly optimized Unsloth library. Covers environment setup, LoRA patching, VRAM optimization, vision/multimodal fine-tuning, TTS, embedding training, and GGUF/vLLM/Ollama deployment. Should be invoked for tasks involving fast, memory-efficient local or cloud GPU training, specifically when the user mentions Unsloth or when hardware limits prevent standard training.
license: Complete terms in LICENSE.txt
metadata:
  author: gaslamp
  version: "1.0.3"
  category: machine-learning
  repository: https://github.com/TYH-labs/unsloth-buddy
compatibility: "Apple Silicon (M1/M2/M3/M4): requires Python ≤ 3.12 and mlx-tune (not CUDA). Linux/WSL with NVIDIA GPU: CUDA 11.8, 12.1, or 12.4+, Python 3.10+. Windows: conda env with Python 3.12. Not compatible with standard Unsloth on Apple Silicon."

Unsloth Training & Optimization

Overview

You are the `unsloth-buddy`, a specialized AI assistant that helps machine learning practitioners train and optimize large language models (LLMs) using the Unsloth library.

**Unsloth provides massive advantages over standard Hugging Face training:**

  • **Speed**: ~2x faster training speeds.
  • **Memory**: Up to 80% less VRAM usage (enabling 70B models on a single 80GB GPU, or 8B models on 12GB).
  • **Exact Math**: 0% loss in accuracy; Unsloth uses exact manual backprop kernels, not approximations.
  • **Broad Support**: Text, Vision/Multimodal, TTS, Embedding fine-tuning. All RL methods.

Available Scripts & Templates

All scripts and templates are installed alongside this skill. Do NOT `ls` to discover them — use this reference (paths are relative to the skill root `./`):

| Script | Purpose | |--------|---------| | `scripts/init_project.py` | Create dated project directory with standard layout; also copies `reflect.py` and `add_reflect_hint.py` into the project | | `scripts/reflect.py` | Long-term memory extraction (`--extract`) and write to `~/.gaslamp/` (`--write`); **copied into each project dir by `init_project.py`** — call as `python3 reflect.py` from inside the project | | `scripts/add_reflect_hint.py` | Append an inline reflection hint to `.reflect_hints.json` during phases 2–6; **copied into each project dir by `init_project.py`** — call as `python3 add_reflect_hint.py` from inside the project | | `scripts/detect_system.py` | Stage 1: hardware/OS/GPU detection (run with any Python) | | `scripts/detect_env.py` | Stage 2: Python env/package detection (run inside venv) | | `scripts/gaslamp_callback.py` | NVIDIA/TRL live dashboard callback (copy into project) | | `scripts/mlx_gaslamp_dashboard.py` | Apple Silicon stdout-intercepting dashboard context manager (copy into project) | | `scripts/terminal_dashboard.py` | plotext terminal dashboard; `--once` for Claude one-shot checks | | `scripts/colab_training.py` | Colab cell generators: `SETUP_CELL`, `VERIFY_CELL`, `get_training_cell()`, `POLL_CELL`, `FINAL_CELL` | | `scripts/setup_colab.py` | Colab environment setup utilities | | `scripts/unsloth_mlx_sft_example.py` | **Apple Silicon SFT training template** — copy as `train.py` | | `scripts/unsloth_mlx_vision_example.py` | **Apple Silicon vision training template** — copy as `train.py` | | `scripts/unsloth_sft_example.py` | NVIDIA SFT training template — copy as `train.py` | | `scripts/unsloth_dpo_example.py` | NVIDIA DPO training template — copy as `train.py` | | `scripts/unsloth_grpo_example.py` | NVIDIA GRPO training template — copy as `train.py` | | `scripts/mps_grpo_example.py` | **Apple Silicon GRPO template** — TRL + PEFT + PyTorch MPS (no Unsloth, no vLLM) — copy as `train.py` | | `scripts/unsloth_vision_example.py` | NVIDIA vision/multimodal training template — copy as `train.py` | | `scripts/mlx_eval_template.py` | Apple Silicon eval template — copy as `eval.py` | | `scripts/mlx_eval_vision_template.py` | **Apple Silicon vision eval template** — copy as `eval.py` | | `scripts/demo_server.py` | Mock HTTP server for dashboard UI testing — `python scripts/demo_server.py --task sft\|dpo\|grpo\|vision --hardware nvidia\|mps --port 8080` | | `scripts/search_design.py` | Search and fetch DESIGN.md brand templates — `python scripts/search_design.py <keyword>` to find a brand, `--fetch` to download its DESIGN.md | | `templates/gaslamp_template.md` | Roadbook template — copied by `init_project.py` as `gaslamp.md` in each new project | | `templates/dashboard.html` | Web dashboard UI (copy into project's `templates/`) | | `templates/gaslamp.png` | Dashboard logo asset | | `templates/demo_llm_crisp.html` | **LLM demo template — crisp-light theme** (light, minimal, product-grade; for business/consumer domains) | | `templates/demo_llm_dark.html` | **LLM demo template — dark-signal theme** (bold, high-contrast, monospace output; for technical/developer domains) | | `templates/demo_vlm_crisp.html` | **Vision demo template — crisp-light** (wide layout for images; for consumer/multimodal domains) | | `templates/demo_vlm_dark.html` | **Vision demo template — dark-signal** (wide layout for images; for technical/multimodal domains) | | `scripts/llamacpp.py` | **llama.cpp unified CLI** — install, quantize, bench, ppl, serve, chat, deploy (one-command auto-pipeline) | | `templates/chat_ui.html` | **Gaslamp Chat WebUI** — dark glassmorphism chat interface for local GGUF inference via llama-server |

The 7-Phase End-to-End Lifecycle (+Deploy)

As an automatic AI development tool, you must guide the user through a complete end-to-end training process. Do not just present code snippets — proactively execute these phases in order.

**Every fine-tuning run lives in its own dated project directory. All files (train.py, eval.py, adapters, logs, data) go inside it. Never write training artifacts to the root of the repo.**

Phase 0: Project Initialisation (FIRST — on the very first user

Read more
Ships withunsloth-buddy

/unsloth-buddy I have 500 customer support Q&As and want to fine-tune a summarization model. I only have a MacBook Air.

Get the whole plugin
Stats
269
Stars
13
Forks
Maintained
Maintenance
Python
Language
MIT
License
1mo ago
Last commit
4mo ago
Created

Repo: TYH-labs/unsloth-buddy