---
title: "End-to-End: Fine-tune to Deployment"
type: synthesis
tags: [workflow, end-to-end, synthesis]
updated: 2026-06-19
confidence: high
sources: [raw/llms_txt_doc-fine-tuning-llms-guide.md, raw/llms_txt_doc-datasets-guide.md, raw/llms_txt_doc-lora-fine-tuning-hyperparameters-guide.md, raw/llms_txt_doc-saving-to-gguf.md]
---

# End-to-End: Fine-tune to Deployment

The complete Unsloth workflow, tying the concept pages together.

## 1. Decide & pick a model

Confirm fine-tuning fits (vs RAG/prompting — [fine-tuning-basics](../concepts/fine-tuning-basics.md)). Choose a base model sized to your GPU and task.

## 2. Set up

[Install](../concepts/installation.md) locally, or just open the matching [notebook](../summaries/model-catalog-and-notebooks.md) (zero setup).

## 3. Prepare data

Build a clean [dataset](../concepts/datasets.md) in chat/instruction format; apply the model's **chat template**; hold out an eval slice. Quality beats quantity.

## 4. Configure

Load with `FastLanguageModel` ([unsloth-library](../entities/unsloth-library.md)), add **QLoRA** (4-bit) adapters, set [hyperparameters](../concepts/lora-and-hyperparameters.md): rank/alpha, target_modules, LR ~2e-4, 1–3 epochs, effective batch size via grad-accum.

## 5. Train

Run `SFTTrainer` for supervised fine-tuning, or [GRPO](../concepts/reinforcement-learning.md) for reasoning/RL (with a robust reward function — watch for reward hacking). Monitor train vs eval loss for overfitting.

## 6. Evaluate

Test the fine-tune with in-framework [inference](../concepts/inference-and-deployment.md) on held-out prompts before exporting.

## 7. Save & export

[Save](../concepts/saving-and-exporting.md) adapters (iterate), or merge to 16-bit/4-bit, or export **GGUF** (Dynamic 2.0 quant) / Ollama Modelfile / push to the Hub.

## 8. Deploy

[Run/serve](../concepts/inference-and-deployment.md): Ollama or LM Studio (local), **vLLM** (production throughput), llama.cpp (edge/CPU). Or use the [Studio](../concepts/unsloth-studio.md) UI for the whole loop.

## Common pitfalls

Wrong/missing [chat template](../concepts/datasets.md) (garbled outputs), too many epochs (overfit), LR too high (instability/loss spikes), OOM (drop to QLoRA, lower batch/seq-len, raise grad-accum), and RL [reward hacking](../concepts/reinforcement-learning.md). Model-specific gotchas: the per-model guides ([model-catalog-and-notebooks](../summaries/model-catalog-and-notebooks.md)).
