finetuning-method-selection

Routes fine-tuning requests to the right method, base model size class, and memory plan.

39.3k|4.2k|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/wshobson/agents --skill finetuning-method-selection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finetuning-method-selection
Source: https://github.com/wshobson/agents/tree/main/plugins/llm-finetuning/skills/finetuning-method-selection
Command: npx skills add https://github.com/wshobson/agents --skill finetuning-method-selection

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Teams often jump straight into fine-tuning when RAG or prompt engineering would solve the problem more cheaply, or pick the wrong training method for the data they actually have. This Skill acts as the router for the entire fine-tuning lifecycle: it decides whether to fine-tune at all, and if so, which method (SFT, DPO/ORPO/KTO, GRPO/RLVR, or continued pretraining) and which base-model size class fit the task and hardware.

Core Features & Use Cases

  • Off-Ramp Checks First: Routes volatile-fact problems to RAG and unstable-behavior problems to prompt engineering before any training run is considered.
  • Data-Shape Method Router: Maps the data you have (demonstrations, preference pairs, unpaired thumbs up/down, verifiable pass/fail signals) to the correct method, with worked routing examples and common mistakes.
  • Memory Feasibility Worksheets: Estimates weights, optimizer states, gradients, and activations per method and dtype, with anchors like 8B-class LoRA at ~16GB and 70B-class QLoRA at ~40GB.
  • Use Case: You have unpaired reviewer thumbs-up/down feedback on model responses. The router identifies this as an unpaired preference signal and routes you to KTO rather than DPO, then hands off to the preference-optimization skill.

Quick Start

Ask the assistant to decide whether your task needs fine-tuning, RAG, or prompt engineering, and which training method and model size class to use.

Frequently Asked Questions about finetuning-method-selection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide between fine-tuning and RAG for my LLM application?

Use RAG when the gap is facts that change often, such as prices, docs, or news, since fine-tuning bakes in a snapshot that goes stale. Fine-tune when you need stable new behavior or stable dense domain knowledge that prompting cannot deliver.

Should I use DPO or GRPO for preference-based training?

Use DPO when you have paired preferences encoding subjective judgment like tone or style. Use GRPO with RLVR when the task has a verifiable pass/fail signal such as math, code, or tool calls, and only after the model already succeeds sometimes.

When should I use KTO instead of DPO?

Use KTO when your feedback is unpaired thumbs-up/thumbs-down signals rather than paired good/bad response comparisons. DPO requires paired preferences, so unpaired reviewer feedback routes to KTO.

How much GPU memory does fine-tuning a 70B model require?

A 70B-class model via QLoRA lands around 40GB for weights in int4 NF4, while bf16 weights alone would be roughly 140GB. Full fine-tuning also adds optimizer states and gradients per trainable parameter, so QLoRA is the only feasible path at that size class.

When is continued pretraining the right choice over RAG?

Continued pretraining fits stable, dense domain knowledge when you have at least 500MB of domain text, followed by SFT. Below 10MB use RAG only, and between 10MB and 500MB combine RAG with fine-tuning.

Why should the eval harness exist before starting fine-tuning?

No method should be selected before an eval harness exists, because without one you cannot measure whether the training run improved anything. The router treats a missing eval harness as a stop condition before any method decision.