Langsung ke konten
Skillpedia
Agen41k ยท #6731

finetuning-method-selection

Fungsinya

Alat ini membantu Anda memutuskan apakah perlu melatih model AI dan cara terbaik untuk melakukannya. Alat ini mengarahkan Anda ke teknik yang tepat (misalnya belajar dari contoh atau umpan balik) dan ukuran model yang sesuai, sehingga biaya tidak terbuang sia-sia.

Kapan dipakai

  • โœ“Saat Anda memulai proyek pelatihan AI baru.
  • โœ“Jika Anda belum yakin apakah teknik yang lebih sederhana sudah cukup untuk menyelesaikan masalah.
  • โœ“Saat memilih antara melatih dengan preferensi (suka/tidak suka) atau dengan hadiah (benar/salah).

Link skill

https://github.com/wshobson/agents/blob/main/plugins/llm-finetuning/skills/finetuning-method-selection/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/wshobson/agents/blob/main/plugins/llm-finetuning/skills/finetuning-method-selection/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya perlu melatih model agar memahami dokumen teknis perusahaan saya. Apa yang sebaiknya saya lakukan?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini menganalisis masalah Anda untuk melihat apakah pelatihan benar-benar diperlukan. Jika diperlukan, alat ini menanyakan jenis informasi yang Anda miliki (contoh, opini, atau keberhasilan/kegagalan) untuk menyarankan metode dan model yang paling sesuai.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Fine-Tuning Method Selection

This is the router skill for the fine-tuning lifecycle: it decides whether fine-tuning is the right tool at all, and if so, which method and which base-model size class. Every other skill in this plugin assumes this routing already happened โ€” start here before opening lora-qlora-recipes, preference-optimization, or grpo-rlvr-training.

When to Use This Skill

  • Starting any fine-tuning effort, before a framework or base model has been chosen.
  • Unsure whether RAG or prompt engineering would solve the problem more cheaply than training.
  • Choosing between preference optimization (DPO family) and a reinforcement method (GRPO/RLVR) for the same underlying task.
  • Sizing a candidate model/method combination before committing to a run.

Quick Reference

Situation Route
Facts change often (prices, docs, news) RAG, not fine-tuning
Desired behavior still being figured out Prompt engineering
Stable domain knowledge, โ‰ฅ500MB text CPT then SFT โ€” see Off-Ramps First
Have input/output demonstrations SFT โ€” see lora-qlora-recipes
Have preference pairs or thumbs-up/down DPO/ORPO/KTO โ€” see preference-optimization
Have a verifiable pass/fail signal GRPO+RLVR โ€” see grpo-rlvr-training
No eval harness yet Stop โ€” see eval-harness-first

Off-Ramps First

Most requests that sound like "fine-tune this" are served better and cheaper elsewhere. Check these off-ramps before opening a training run:

  • Knowledge-bound and volatile (the gap is facts that change โ€” prices, docs, current events): route to RAG, not fine-tuning. A fine-tuned model bakes in a snapshot; volatile facts go stale immediately.
  • Behavior-bound and shifting (the desired behavior is still being figured out, or changes per request): route to prompt engineering. Fine-tuning locks in a behavior; don't lock in one that hasn't stabilized yet.
  • Stable, dense domain knowledge: this is where continued pretraining (CPT) enters, sized by how much domain text exists:
Domain text volume Route
<10MB RAG only
10MBโ€“500MB RAG + fine-tune
500MBโ€“10GB CPT, then SFT
>10GB CPT required

CPT learning rate โ‰ˆ 10% of the pretraining LR. CPT is guidance-only in this plugin โ€” sizing and LR guidance live here, but this plugin does not execute a CPT run.

Method Router

Once the off-ramps are ruled out, this is the full decision tree (verbatim from the research this plugin is built on):

New FACTS?  volatile โ†’ RAG | stable+dense โ†’ CPT (LR ~10% of pretrain) โ†’ SFT
New BEHAVIOR? shifting โ†’ prompt-engineering | stable:
  demos โ†’ SFT (LoRA/QLoRA, all-linear, ฮฑ=2r)
  preference pairs โ†’ DPO (SimPO if length-bias, ORPO if memory-bound)
  unpaired ๐Ÿ‘/๐Ÿ‘Ž โ†’ KTO
  verifiable success โ†’ RLVR + GRPO (DAPO/GSPO/Dr.GRPO per failure mode)
Deploy: FP8 (Hopper+) | NVFP4 (Blackwell scale) | AWQ (older) | GGUF+imatrix (edge)
BEFORE ANY OF THIS: the eval harness must exist first.

Read the tree top-down: answer "new facts or new behavior," then follow the branch that matches the data shape in hand (demos, preference pairs, thumbs up/down, or verifiable success/failure). The data shape picks the method โ€” not the other way around.

Worked Routing Examples

  • "Users want the assistant to follow our support macros exactly." Behavior is stable and demonstrable from transcripts โ†’ demos โ†’ SFT.
  • "We have pairs of good/bad responses from reviewer thumbs-up/down, unpaired." โ†’ unpaired signal โ†’ KTO, not DPO (DPO needs paired preferences).
  • "The model can already solve some of these math problems and we can grade correctness automatically." โ†’ verifiable success signal โ†’ GRPO+RLVR, and only after confirming the model succeeds at least sometimes (see Key Routing Facts below).
  • "We want the model to know this week's pricing page." โ†’ volatile facts โ†’ RAG, no training run at all.

Key Routing Facts

  • Loss-function choice is low-leverage. A 240-H100-run study found method choice worth ~1 percentage point versus ~50 points for model scale, and zero of 20 DPO variants beat vanilla DPO. Don't spend a routing decision agonizing over DPO-variant selection โ€” spend it on getting the data shape and scale right.
  • DPO is for taste, GRPO+RLVR is for reasoning. Preference pairs that encode a subjective judgment (tone, style, "which answer

โ€ฆ

Pertanyaan umum

Kapan sebaiknya saya menggunakan RAG daripada melatih model?

Gunakan RAG jika informasinya sering berubah (seperti harga atau berita), karena melatih model dengan data yang sudah usang tidak efisien.

Apa itu SFT?

SFT (Supervised Fine-Tuning) adalah metode pelatihan di mana Anda menunjukkan kepada model contoh 'input' dan 'output' yang diinginkan agar model bisa belajar.

Apa itu metode preference optimization (DPO, dan lainnya)?

Metode ini digunakan saat Anda memiliki pasangan respons dan bisa menunjukkan mana yang lebih baik, sehingga model belajar memilih jawaban dengan kualitas lebih tinggi.

Detail

Deskripsi asli dari pembuat

Decide whether to fine-tune at all, and route to the right method (SFT, DPO/ORPO/KTO, GRPO/RLVR, continued pretraining) and base model. Use when starting any fine-tuning effort, when unsure whether RAG or prompting would suffice, or when choosing between preference-optimization and reinforcement methods.

repo: wshobson/agents

Popularitas

Bintang GitHub
41k
Peringkat
#6731
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa