Models & architecture
Fine-tuning
Definition
Fine-tuning continues training a pre-trained model on your own examples to specialise its behaviour. It is the right tool for teaching consistent style, format or classification behaviour — not for adding knowledge.
Fine-tuning adjusts model weights using a dataset of input-output pairs. Parameter-efficient methods such as LoRA modify only a small subset of weights, making it dramatically cheaper than full fine-tuning while capturing most of the benefit.
The most common mistake is fine-tuning to add facts. It works poorly and unpredictably — the model may learn the phrasing of your documents without reliably learning their content. Use retrieval for knowledge; use fine-tuning for behaviour.
Before fine-tuning, exhaust prompting. A well-constructed few-shot prompt often matches fine-tuned performance with none of the data-collection or maintenance burden. Fine-tuning earns its cost when you need consistency at high volume, or when the prompt overhead of examples becomes expensive.
Related terms
Few-shot prompting
Few-shot prompting means including two to five worked examples of the input-output pattern you want before making your real request. It is the fastest way to lock in a consistent format, tone or edge-case behaviour.
RAG (Retrieval-Augmented Generation)
RAG retrieves relevant passages from your own documents and inserts them into the prompt before the model answers. It grounds responses in your data, cuts hallucination, and needs no retraining.
LoRA
LoRA (Low-Rank Adaptation) is a fine-tuning method that trains small adapter matrices instead of updating all model weights. It cuts the compute and storage cost of fine-tuning by orders of magnitude.
Parameters
Parameters are the learned numerical weights inside a model, adjusted during training. Parameter count — 7B, 70B, 405B — is a rough proxy for capacity, but not a reliable predictor of quality.
Large language model (LLM)
A large language model is a neural network trained on vast amounts of text to predict the next token in a sequence. That single objective, at sufficient scale, produces the ability to write, summarise, translate, reason and code.
Transformer
The transformer is the neural network architecture behind virtually all modern language models. Its key innovation is self-attention, which lets every token directly consider every other token in the input.
Put this into practice
Understanding the term is step one. Our free courses and tools let you actually use it.