tune-train

tune-train is a skill for Claude Code from rchaz/tunelab. It costs 129 tokens per session (5,179 once invoked), scanned A, original, MIT.

A local tool for fine-tuning language models on Apple Silicon computers using MLX-LM. It supports methods such as LoRA, QLoRA, full fine-tuning, and continued pretraining after a training plan and dataset have been validated.

In plain words
What is it for?
Use it to choose a base model and training settings, start or resume a training run, monitor loss curves, diagnose problems, continue pretraining on a prepared dataset, and combine adapters with a model.
Why use it?
It helps run and inspect training without manually assembling commands or losing track of settings, progress, and saved adapter results.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tunelab plugin — 5 skills shipped together

Good fit Use it to choose a base model and training settings, start or resume a training run, monitor loss curves, diagnose problems, continue pretraining on a prepared dataset, and combine adapters with a model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rchaz/tunelab/tune-train
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.

Any agent
npx skills add rchaz/tunelab --skill tune-train
Clone the repo
git clone --depth 1 https://github.com/rchaz/tunelab

Made for: Claude Code.

Or install tunelab, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tune-train

README.md
[![agentmods](https://agentmods.dev/badge/skills/rchaz/tunelab/tune-train.svg)](https://agentmods.dev/skills/rchaz/tunelab/tune-train)
Your own site
<a href="https://agentmods.dev/skills/rchaz/tunelab/tune-train"><img src="https://agentmods.dev/badge/skills/rchaz/tunelab/tune-train.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00129 $0.05179
Opus 5 $0.00064 $0.02589
Sonnet 5 $0.00026 $0.01036
Haiku 4.5 $0.00013 $0.00518

Measured 7d ago against content hash a98492654ecb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

tune-train scanned grade A with 1 finding 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/recommend_hparams.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Verify before ANY download** — it is one curl; repo names churn, and a dead multi-GB pull is just the expensive version:
skills/tune-train/SKILL.md · 219 lines

How it starts

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

tune-train — local training on Apple Silicon (MLX-LM)

Drives mlx_lm.lora over a validated data/ directory from tune-data (train.jsonl/valid.jsonl/test.jsonl). Full verified CLI reference: references/mlx-reference.md (mlx-lm 0.31.3). <skill-dir> below = the directory containing this SKILL.md; run commands from the user's project workdir.

Teaching default (explain-why protocol): every step you run gets four short lines before — What we're doing · Why (the failure it prevents) · Expect (healthy output) · Read (how to interpret what came out) — and one line after connecting result → next decision. One-liners, not essays. Define jargon inline on first use, pointing at the bundled concepts files for depth (plugin root, ../../concepts/ relative to this file). If the user says "skip the teaching" (or is clearly expert): drop Why/Expect/Read, keep What + the result reading.

Stop-and-ask points (pre-registration; these exactly, nowhere else): the level recommendation (tune-decide), the labeling prompt (tune-data), the acceptance bar AND metric set (registered by tune-decide at decision time; must be on disk before any training launch), and any expensive run — which here means every training launch (Step 4).

Step 0 — Read the project state from disk FIRST

Before asking the user anything:

  1. Read EXPERIMENT-LOG.md in the workdir. tune-decide wrote the interview summary and level decision there; tune-data wrote data provenance. Never re-ask what's already answered. No level decision for this task → do not train; route to tune-decide first. tune-train assumes a validated Level 2/3 decision — for fixed-label outputs especially, a Level-1 classifier usually makes this whole skill unnecessary.
  2. Scan runs/*/state.json. For any run with "status": "running": is the PID alive (ps -p <pid>)? Is the log tail fresh (tail -n 30 <log_path>, recent mtime)? Alive + fresh → offer to re-attach and go straight to Step 5 monitoring. Dead with iters remaining → set "status": "interrupted" and offer the Step 6 resume.

Read the full file on GitHub · 219 lines

Files

What ships with it

2 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. 7d ago First seen · 219 lines · 129 tokens per session scan A a98492654ecb

Subscribe to this mod's changes

tune-train is a skill published in the GitHub repository rchaz/tunelab (6 stars, last pushed 1mo ago), licensed MIT. It adds 129 tokens to every session and 5,179 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

implementing-llms-litgpt

Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral). Use when need clean model implementations, educational understanding of architectures, or production fine-tuning with LoRA/QLoRA. Single-file implementations, no abstraction layers.

davila7/claude-code-templates · 77 tokens

llama-factory

Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.

davila7/claude-code-templates · 51 tokens

tinker-fine-tuning

Provides guidance for fine-tuning LLMs using the Tinker cloud training API from Thinking Machines Lab. Use when running supervised fine-tuning, reinforcement learning (GRPO/PPO), or LoRA training on cloud GPUs via Tinker's managed infrastructure instead of local compute.

synthetic-sciences/openscience · 62 tokens

colab-finetuning

Fine-tune LLMs on Google Colab GPUs directly from openscience. Connects to Colab runtimes via WebSocket bridge for remote training with Unsloth. Supports SFT, GRPO, DPO, vision, and TTS workflows on free T4 to Pro A100 GPUs.

synthetic-sciences/openscience · 67 tokens

llm-integration

LLM integration patterns for function calling, streaming responses, local inference with Ollama, and fine-tuning customization. Use when implementing tool use, SSE streaming, local model deployment, LoRA/QLoRA fine-tuning, or multi-provider LLM APIs.

yonatangross/orchestkit · 58 tokens

peft-fine-tuning

Parameter-efficient fine-tuning for LLMs using LoRA, QLoRA, and 25+ methods. Use when fine-tuning large models (7B-70B) with limited GPU memory, when you need to train <1% of parameters with minimal accuracy loss, or for multi-adapter serving. HuggingFace's official library integrated with transformers ecosystem.

davila7/claude-code-templates · 82 tokens