finetuning

finetuning is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 102 tokens per session (4,070 once invoked), scanned A, original, MIT.

A guide to fine-tuning open-weight AI models, meaning changing a model's learned behavior with additional training. It covers teaching tone, output formats, and response patterns using supervised and preference-based methods.

In plain words
What is it for?
It supports deciding between fine-tuning, prompting, and retrieval, then training and evaluating models with LoRA, QLoRA, SFT, and preference optimization.
Why use it?
It helps distinguish behavior changes that need training from current facts that should be supplied through retrieval or prompting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It supports deciding between fine-tuning, prompting, and retrieval, then training and evaluating models with LoRA, QLoRA, SFT, and preference optimization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ericrisco/rsc-harness/finetuning
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 ericrisco/rsc-harness --skill finetuning
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

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 finetuning

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/finetuning/github.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/finetuning)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/finetuning"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/finetuning/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for finetuning

Your own site · 80×15
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/finetuning"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/finetuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00102 $0.04070
Opus 5 $0.00051 $0.02035
Sonnet 5 $0.00020 $0.00814
Haiku 4.5 $0.00010 $0.00407

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

Security

Grade A, and why

finetuning scanned grade A with 0 findings 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.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/finetuning/SKILL.md · 233 lines

How it starts

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

finetuning — teach an open model a form or behavior, not a fact

You own the discipline of adapting an open-weight model: deciding whether to fine-tune at all, then running SFT and (optionally) preference optimization with trl + peft, backend-agnostic. You are judged by whether the tuned model reliably produces the target form/behavior on a held-out set — not by train loss, and not by vibes.

The one sentence that routes half of all "should I fine-tune?" questions correctly: fine-tuning teaches form and behavior; RAG supplies facts. If the ask is "know our latest prices / docs / tickets," that is retrieval (../rag/SKILL.md), not training. If the ask is "sound like us, always emit this JSON, follow this reasoning pattern," that is here.

Decision gate — try this BEFORE reaching for a GPU

Fine-tuning is the last lever, not the first. Exhaust the cheaper, reversible options first; each row below is a real off-ramp.

If the goal is… Do this first Fine-tune only when…
The model should know current/company facts RAG (../rag/SKILL.md) — retrieve + ground never for facts; facts go stale, weights don't update
One-off format/tone, small volume Prompt + few-shot (prompt-engineering) the prompt is huge, brittle, or you pay for it every call
Behavior depends on a long document Longer context / put it in the prompt context won't fit, or per-call token cost is the bottleneck
Consistent form/behavior at scale, latency/cost sensitive prompting plateaus AND you have (or can build) good examples
A capability the base model just can't do you have a reward signal or demonstration data for it

Route out explicitly. Facts / freshness / citations → ../rag/SKILL.md. Squeezing a prompt before spending money → prompt-engineering. Picking which base model (size/license/task) → open-weights. Building the JSONL/preference corpus → training-data (LLM corpora, NOT tabular cleaning — that is data-cleaning). A fast single-GPU run + GGUF export → ../unsloth/SKILL.md (same LoRA/QLoRA concepts, one optimized implementation; this skill stays backend-agnostic). Downloading the base or pushing the adapter/merged model → huggingface. Serving the result → ../vllm/SKILL.md.

Read the full file on GitHub · 233 lines

Files

What ships with it

4 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 · 233 lines · 102 tokens per session scan A 715a71d7b2aa

Subscribe to this mod's changes

finetuning is a skill published in the GitHub repository ericrisco/rsc-harness (78 stars, last pushed yesterday), licensed MIT. It adds 102 tokens to every session and 4,070 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fine-tuning

LLM fine-tuning authority — LoRA, QLoRA, and full fine-tuning workflows with PEFT, Axolotl, and Unsloth; supervised fine-tuning (SFT), DPO, and RLHF alignment; dataset curation and formatting; GPTQ/AWQ quantization; vLLM serving; and evaluation with lm-evaluation-harness.

LuuOW/meridian-mcp · 80 tokens

fine-tuning-with-trl

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

davila7/claude-code-templates · 69 tokens

axolotl

Expert guidance for fine-tuning LLMs with Axolotl - YAML configs, 100+ models, LoRA/QLoRA, DPO/KTO/ORPO/GRPO, multimodal support.

davila7/claude-code-templates · 47 tokens

fine-tuning-with-trl

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

OpenLAIR/dr-claw · 69 tokens

axolotl

Expert guidance for fine-tuning LLMs with Axolotl - YAML configs, 100+ models, LoRA/QLoRA, DPO/KTO/ORPO/GRPO, multimodal support.

OpenLAIR/dr-claw · 47 tokens

axolotl

Expert guidance for fine-tuning LLMs with Axolotl - YAML configs, 100+ models, LoRA/QLoRA, DPO/KTO/ORPO/GRPO, multimodal support.

synthetic-sciences/openscience · 47 tokens