← Back to glossary

Fine-tuning

The process of further training an existing AI model on examples from your domain, to specialize it in a specific style, format or task.

Fine-tuning means taking an already-trained AI model and continuing its training on a smaller set of examples from your own domain: input/output pairs that show exactly how you want it to respond. The model keeps everything it already knew and absorbs the behavior in your examples: tone of voice, format, vocabulary, classification decisions.

It differs from RAG: RAG gives the model knowledge at question time (retrieves documents and injects them into the prompt); fine-tuning changes the model's own behavior. Rule of thumb: information that changes often → RAG; style, format and well-defined repetitive tasks → fine-tuning. Providers like OpenAI offer fine-tuning as an API service; open models can be tuned on your own or rented GPU infrastructure (Replicate, RunPod).

The costs: preparing hundreds or thousands of quality examples, training and evaluating, which is why it pays to start with prompt engineering and RAG, and only move to fine-tuning when they fall short. A concrete example: a fintech tunes a model on thousands of customer messages already labeled by category; the fine-tuned model then classifies new tickets in the company's exact standard, with short prompts and lower cost per call.

OpenAI API logo

AI APIs & Tokens

OpenAI API

GPT-4o, o1, and DALL-E 3 API with function calling, structured output, and batch inference discounts.

From $0.15/per token
VERIFIED
GPT-4o & o1Function calling
RunPod logo

GPU Cloud

RunPod

On-demand GPUs and serverless inference for training and running AI models.

From $0.27/monthly
GPU sob demandaPreço observado por hora

Categories

See also