Fine-Tuning, LoRA, and Model Selection
Choose the intervention that matches the failure
Start with a failure analysis. If answers lack current company facts, retrieval is a strong candidate. If the model consistently ignores a stable output convention despite good prompting, adaptation may help. If authorization is wrong, repair the application boundary.
Prompting changes inference input. Retrieval supplies external information at inference. Fine-tuning changes learned parameters. They can be combined; they solve different problems.
Full and parameter-efficient updates
Full fine-tuning updates all model parameters and can require substantial memory. Parameter-efficient methods update a smaller set of additional or selected parameters. LoRA represents a weight update using low-rank matrices, commonly written ΔW = BA, while leaving the original weights frozen during adapter training.
For an illustrative 4096×4096 matrix, full weights contain 16,777,216 values. A rank-8 pair has 4096×8 + 8×4096 = 65,536 adapter values for that matrix, excluding scaling and other parameters. This reduces trainable storage but does not remove the base model's memory or guarantee equal quality on every task.
Quantized adapter training combines a reduced-precision base with trainable adapters. It still needs careful numerical and evaluation choices. Quantization and parameter-efficient tuning are related deployment techniques, not synonyms.
A defensible adaptation workflow
- Collect representative input-output pairs with correct permissions.
- Separate train, validation, and test by relevant user or time boundaries.
- Compare the unchanged model with a well-designed prompt baseline.
- Train an adapter or model configuration and record the artifact versions.
- Test the target task, regressions, safety behavior, and important subgroups.
- Release gradually with a rollback path.
Watch for catastrophic forgetting: improving one task can damage others. Training on secrets is not a secure way to store them; memorization can create disclosure risk.
Model selection criteria
Compare models using your workload, output constraints, language needs, latency, cost, context requirements, licensing, hardware, and privacy constraints. “Open weights” means weights are available under some terms; it does not automatically mean open-source licensing or unrestricted commercial use.
Checkpoint with answers
Will LoRA necessarily teach a model changing product prices reliably? No. Frequently changing facts are usually better supplied from an authoritative source.
Why keep a test set separate from training examples? To measure generalization rather than reproduction of the adaptation data.