Fine-tuning
Fine-tuning is additional training of a pre-trained foundation model on specialized data to adapt its performance to a specific domain. Unlike the initial pre-training (which costs millions of dollars), fine-tuning adjusts existing parameters at a much lower cost. The LoRA technique makes efficient fine-tuning possible even with limited resources.
Fine-tuning is an adaptation technique that lets you specialize a generic foundation model for a precise domain such as law. Instead of retraining a model from scratch (an operation that costs millions of dollars and requires massive infrastructure), fine-tuning adjusts existing parameters on a target corpus that is much smaller but highly specialized.
In a legal context, fine-tuning makes it possible to adapt an LLM to the terminology of French law, to the specific structures of court decisions, and to the drafting style of pleadings or legal documents. The LoRA (Low-Rank Adaptation) technique revolutionized this approach by enabling efficient fine-tuning with limited compute resources, putting specialization within reach of smaller players.
Fine-tuning does come with risks, however: over-specialization (the model loses general capability), amplification of biases present in the training corpus, and potentially an increase in hallucinations on topics outside the fine-tuning corpus. This is why legaltech solutions often combine fine-tuning and RAG: fine-tuning for style and terminology, RAG for factual accuracy.
Related terms
A foundation model is a large AI model trained on massive unlabeled data through self-supervised learning, adaptable to a wide ran…
An LLM (Large Language Model) is an artificial intelligence model trained on massive volumes of text to learn the statistical stru…
RAG (Retrieval Augmented Generation) is a technique that combines document retrieval with an LLM. Before generating an answer, the…
A training corpus refers to the body of data used to train an AI model. For LLMs, it consists of billions of texts drawn from the …
AI hallucinations refer to the generation of false, fabricated or inconsistent information presented with apparent certainty by a …