fine-tuning-llms

Guide LLM fine-tuning workflows with PEFT methods and deployment.

5|1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill fine-tuning-llms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fine-tuning-llms
Source: https://github.com/roanbrasil/engineer-grade-agent-skills/tree/main/skills/fine-tuning-llms
Command: npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill fine-tuning-llms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the guesswork and costly mistakes when adapting large language models to custom tasks, helping you avoid common anti-patterns like using fine-tuning for factual knowledge injection or skipping baseline prompting tests.

Core Features & Use Cases

  • Decision Framework: Clear matrix to choose between prompting, RAG, and fine-tuning based on task requirements, avoiding wasted effort on the wrong approach.
  • PEFT Implementation: Guidance on LoRA, QLoRA, DoRA, and IA3 methods with exact hyperparameter recommendations and hardware requirements for models from 7B to 70B parameters.
  • End-to-End Workflow: Complete instructions for dataset preparation, training (Python with Unsloth/TRL or Hugging Face PEFT, Java/Kotlin serving patterns), evaluation (quantitative metrics, A/B testing, regression testing), and production deployment (LoRA merging, quantization, vLLM serving).
  • Use Case: Use this Skill to fine-tune a 7B LLM to match your company's customer support tone and response format, cutting inference costs by 75% compared to using a larger base model.

Quick Start

Use the fine-tuning-llms skill to guide me through fine-tuning a Llama 3 8B model for my customer support team's response style, including dataset preparation, LoRA training, and deployment to vLLM.

Frequently Asked Questions about fine-tuning-llms

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

FAQPage Schema
When should I use LLM fine-tuning instead of prompting or RAG?

Fine-tuning is necessary for custom model behavior, style, tone, or format consistency, such as domain-specific customer support. It should not be used for factual knowledge injection; a decision framework helps choose between prompting, RAG, and fine-tuning.

How do I fine-tune a Llama 3 8B model for customer support response style?

You can fine-tune a Llama 3 8B model by following an end-to-end workflow that includes dataset preparation, LoRA training with Unsloth or TRL, and deployment to vLLM. This matches your support tone and cuts inference costs by 75%.

What is the best PEFT method for fine-tuning large language models on limited hardware?

LoRA and QLoRA are effective PEFT methods for limited hardware, with exact hyperparameter recommendations available for models from 7B to 70B parameters. DoRA and IA3 are also supported options based on specific constraints.

Does this fine-tuning workflow support quantization and vLLM serving for production deployment?

Yes, the workflow supports production deployment using LoRA merging, quantization, and vLLM serving. It also includes Java and Kotlin serving patterns alongside Python training implementations.

How do I evaluate fine-tuned LLMs to prevent catastrophic forgetting?

You can prevent catastrophic forgetting by implementing a robust evaluation framework that includes quantitative metrics, A/B testing, and regression testing. This ensures the model retains its base capabilities while adapting to new tasks.

Can I use fine-tuning to inject factual knowledge into my custom LLM?

No, fine-tuning is an anti-pattern for factual knowledge injection. You should use RAG or prompting for factual queries, reserving fine-tuning for adapting model behavior, style, tone, or format consistency.