qodex-ai avatar

Llm Fine Tuning Guide

A comprehensive reference for adapting large language models to specific domains and tasks. Covers the full spectrum from full fine-tuning to parameter-efficient approaches like LoRA and QLoRA, with working code examples for each. The guide is practical about tradeoffs: full fine-tuning needs 1000+ examples and serious compute, while LoRA trains 99% fewer parameters in a fraction of the time. Includes data preparation scripts, validation techniques, and clear guidance on when fine-tuning makes sense versus just using better prompts or RAG. Best when you need a model specialized for legal docs, medical records, or other domain-specific work where base model performance isn't cutting it.

skills.sh installs
194
GitHub stars
48
last updated
Aug 21, 2026

Install

$ npx -y skills add qodex-ai/ai-agent-skills --skill llm-fine-tuning-guide --agent claude-code

Installs into .claude/skills of the current project.

Files

LLM Fine-Tuning Guide

Master the art of fine-tuning large language models to create specialized models optimized for your specific use cases, domains, and performance requirements.

Overview

Fine-tuning adapts pre-trained LLMs to specific tasks, domains, or styles by training them on curated datasets. This improves accuracy, reduces hallucinations, and optimizes costs.

When to Fine-Tune

  • Domain Specialization: Legal documents, medical records, financial reports
  • Task-Specific Performance: Better results on specific tasks than base model
  • Cost Optimization: Smaller fine-tuned model replaces expensive large model
  • Style Adaptation: Match specific writing styles or tones
  • Compliance Requirements: Keep sensitive data within your infrastructure
  • Latency Requirements: Smaller models deploy faster

When NOT to Fine-Tune

  • One-off queries (use prompting instead)
  • Rapidly changing information (use RAG instead)
  • Limited training data (< 100 examples typically insufficient)
  • General knowledge questions (base model sufficient)

Quick Start

Full Fine-Tuning:

python examples/full_fine_tuning.py

Sponsors

Details

Repository
github.com/qodex-ai/ai-agent-skills
Categories
Documentation, AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from qodex-ai/ai-agent-skills

All 24
1yunshu0909 avatarprd-doc-writeryunshu0909/yunshu_skillshubWrite and iteratively refine PRD/需求文档 with a story-driven structure and strict staged confirmations (journey map alignment, per-story single-point confirmation,191skills.sh installs
2aliramw avatardingtalk-docsaliramw/dingtalk-docs管理钉钉云文档中的文档、文件夹和内容。当用户想要创建文档、创建表格/脑图/白板/演示/多维表等文件、搜索文档、读取或写入文档内容、创建文件夹整理文档、遍历文件夹结构、精确编辑文档块元素时使用。也适用于用户提到云文档、在线文档、钉钉文档、钉文档等关键词的场景。不要在用户需要管理日程、发消息或处理审批流时触发。190skills.sh installs
3bobmatnyc avatarWriting Plansbobmatnyc/claude-mpm-skillsCreate detailed implementation plans with bite-sized tasks for engineers with zero codebase context187skills.sh installs
4zhylq avatarzhy-wechat-writingzhylq/yuan-skillsUse when generating a complete WeChat article from a topic, with optional source research, evidence tracking, illustration, HTML conversion, and draft-box publi181skills.sh installs
5melodic-software avatararchitecture-documentationmelodic-software/claude-code-pluginsGenerate architecture documents using templates with diagram integration. Use for creating C4 diagrams, viewpoint documents, and technical overviews.180skills.sh installs
6flora131 avatarexplain-codeflora131/atomicexplain code176skills.sh installs