Fine-Tuning vs Prompting — When Is Fine-Tuning Worth the Cost?
Fine-tuning creates a custom model variant trained on your data. It costs upfront but can reduce per-call costs and improve quality for narrow tasks. This guide covers pricing, break-even math, and when prompting is actually better.
What fine-tuning actually does
Fine-tuning takes a base model and trains it further on your task-specific data — typically hundreds to thousands of examples. The result is a custom model that performs your specific task better than the base model with a generic prompt. You pay a one-time training cost, then per-token inference cost (often at a premium over the base model).
Fine-tuning pricing by provider
OpenAI: training costs $25/M tokens for GPT-5 mini, $100/M for GPT-5.4. Inference runs at 1.5–2× the base model price. Google: training costs vary by model; Gemini fine-tuning is in preview. Anthropic: Claude fine-tuning is available for enterprise customers — contact sales. Open-weight models (Llama 4, Qwen 3): training is free (you run it on your own GPUs), but GPU time costs $2–4/hr per GPU for 1–20 hours depending on model size and dataset.
The break-even calculation
Fine-tuning pays off when: (training_cost + N × finetuned_inference_cost) < (N × base_inference_cost_with_long_prompt). A fine-tuned model needs no few-shot examples or long system prompt — saving 500–3,000 tokens per call. At 100K calls/month, saving 1,000 tokens/call at $2.50/M = $250/month. If training cost $500, you break even in 2 months. Below 10K calls/month, fine-tuning rarely pays off for proprietary models.
When prompting beats fine-tuning
Prompting is better when: (1) your task changes frequently — fine-tuning locks you to a specific task, (2) you have fewer than 200 high-quality examples, (3) you need the model's general knowledge (fine-tuning can narrow it), (4) your volume is low (<10K calls/month). Prompt engineering with caching often achieves 80% of fine-tuning's benefit at zero upfront cost.
When fine-tuning wins decisively
Fine-tuning is clearly better for: (1) classification with a fixed label set (95%+ accuracy vs 85% with prompting), (2) consistent output format (JSON with exact schema, no hallucinated fields), (3) brand voice / tone matching (learns your specific style from examples), (4) domain-specific terminology (medical, legal, financial). The quality gain on narrow tasks is often 10–20%, which matters for production applications.
Related calculators
Related guides
Frequently Asked Questions
How much data do I need for fine-tuning?
Minimum: 50–100 high-quality examples for simple tasks (classification). Recommended: 500–1,000 examples for complex tasks (generation, analysis). More data generally helps, but quality matters more than quantity. 200 carefully curated examples often outperform 2,000 noisy ones.
Can I fine-tune open-weight models for free?
The model weights are free (Llama 4, Qwen 3, Mistral are open-weight). But training requires GPUs: a 7B model takes ~2 hours on a single A100 ($5–8). A 70B model takes 8–20 hours on 4–8 A100s ($80–400). After training, you also need GPUs for inference. "Free" refers to licensing, not compute.
How long does fine-tuning take?
OpenAI GPT-5 mini with 1,000 examples: 15–30 minutes. GPT-5.4 with 1,000 examples: 1–3 hours. Self-hosted Llama 8B with QLoRA: 1–2 hours on a single A100. Self-hosted Llama 70B with QLoRA: 4–12 hours on a single A100. Larger datasets scale linearly — 10,000 examples takes roughly 10× longer. Training time is a one-time cost; plan to re-train quarterly or when your data distribution changes significantly.
What format does fine-tuning data need to be in?
OpenAI: JSONL with {"messages": [{"role": "system", ...}, {"role": "user", ...}, {"role": "assistant", ...}]} per line. Anthropic: similar conversation format. For open-weight models with Axolotl or TRL: various formats supported including Alpaca (instruction/input/output), ShareGPT (conversations), and raw completion pairs. The most critical requirement is consistency — every example should follow the exact same format and instruction style.
Can fine-tuning reduce my per-request cost?
Yes — fine-tuned models often need shorter prompts (no few-shot examples, minimal instructions) because the behavior is baked into the weights. If fine-tuning eliminates a 2,000-token system prompt, you save 2,000 tokens per request. At 100K requests/month on GPT-5.4: savings = $500/month on input tokens, partially offset by the 1.5× fine-tuned inference premium. Net savings depend on how much prompt text the fine-tune replaces.
What is LoRA and why is it cheaper than full fine-tuning?
LoRA (Low-Rank Adaptation) freezes the original model weights and trains small adapter matrices (typically 0.1–1% of total parameters). This reduces GPU memory requirements by 80–90%: you can LoRA-tune a 70B model on a single A100 instead of needing 8 GPUs for full fine-tuning. Quality is within 1–3% of full fine-tuning for most tasks. QLoRA goes further by quantizing the base model to Q4 during training, cutting memory requirements in half again.
How do I evaluate if my fine-tuned model is good enough?
Hold out 10–20% of your training data as a test set (never seen during training). Run the fine-tuned model and the base model (with your best prompt) on this test set. Compare: accuracy, format compliance, response quality (human-rated sample). If the fine-tuned model matches or exceeds the base model on your test set, it is ready. If not, diagnose: too few examples, noisy data, or wrong learning rate. Most failures come from low-quality training data, not insufficient quantity.
Can I fine-tune for multiple tasks in one model?
Yes, with caveats. Multi-task fine-tuning works well when tasks are related (e.g., classification + extraction from the same domain). Include task type indicators in your training examples ("Task: classify" vs "Task: extract"). Quality on each individual task may be 5–10% lower than a single-task fine-tune. For very different tasks (code generation + legal analysis), separate fine-tunes are usually better — merging them can degrade both.
Guide updated 2026-11-18. Pricing data verified weekly. See methodology · sources.