# Fine-Tuning
**Fine-tuning** is the process of taking a pre-trained [[Foundation Model]] and continuing its training on a smaller, specialized dataset to adapt it for a specific task, domain, or behavior pattern. It is the mechanism that transforms a general-purpose language model into a medical assistant, a legal analyzer, a code generator, a military intelligence tool — or a system with its safety guardrails removed.
The process is relatively cheap and fast compared to pre-training. Pre-training a frontier model costs $100M–$1B+ and takes months on thousands of GPUs. Fine-tuning can be done in hours on a single GPU cluster, for a few hundred to a few thousand dollars — or less, using parameter-efficient techniques like [[LoRA]] that modify only a small fraction of the model's [[Parameters]].
## Types of Fine-Tuning
**Supervised Fine-Tuning (SFT):** The most straightforward approach. Provide examples of desired input-output pairs (question → ideal answer), and the model adjusts its parameters to produce similar outputs. This is the first stage of the [[RLHF]] pipeline that turns base models into assistants.
**Instruction Tuning:** A variant of SFT focused on teaching the model to follow diverse instructions. The training data consists of many different tasks (summarize, translate, code, analyze) framed as instructions. This is what makes a model "understand" prompts rather than just predict text.
**Domain-Specific Fine-Tuning:** Training on data from a particular field — medical literature, legal case law, financial filings, military intelligence reports — to improve the model's performance in that domain. The model learns domain-specific terminology, reasoning patterns, and knowledge.
**Safety Fine-Tuning / Alignment:** Training the model to refuse harmful requests, avoid generating dangerous content, and follow ethical guidelines. This is the layer that closed-model providers (OpenAI, Anthropic) use to control model behavior — and the layer that adversaries seek to remove.
## The Dual-Use Hinge
Fine-tuning is the mechanism through which the [[Dual-Use AI]] becomes operational. A foundation model is general-purpose by design; fine-tuning is how it gets specialized for specific applications — beneficial or harmful.
For [[Open-Weight AI]], fine-tuning is where the developer's control ends. Safety fine-tuning (teaching the model to refuse harmful requests) can be reversed through further fine-tuning in a matter of hours. Researchers have repeatedly demonstrated that open-weight models can be fine-tuned to remove safety guardrails, produce weapons instructions, generate CSAM-adjacent content, or optimize for military targeting — all with modest compute resources.
This is the technical basis of the [[Llama Military Adoption]] documented in the KB: Chinese military-affiliated researchers fine-tuned Meta's Llama for military applications. Meta's acceptable-use policy prohibits this, but fine-tuning is a one-way door — once the weights are released, the developer cannot prevent or detect downstream fine-tuning.
## KB Significance
1. **The dual-use mechanism.** Fine-tuning is the specific technical process through which general-purpose AI becomes weaponized AI, surveillance AI, or propaganda AI. Every defense-tech application documented in the KB — [[Palantir AIP]], Anduril's targeting systems, military Llama variants — involves fine-tuning commercial models on military data.
2. **The safety-guardrail vulnerability.** Fine-tuning's ability to remove safety training means that safety is a surface property of open-weight models, not a deep one. This has direct implications for AI governance: regulation based on model safety testing at release time does not account for post-release fine-tuning by downstream users.
3. **The democratization tool.** Fine-tuning is also what enables smaller organizations, researchers, and individuals to adapt powerful models for legitimate specialized applications — medical diagnosis, scientific research, accessibility tools — without the resources to train from scratch. The same mechanism that enables misuse also enables broad access.
## See Also
- [[Foundation Model]] — What gets fine-tuned
- [[RLHF]] — Fine-tuning using human preferences
- [[Open-Weight AI]] — Where fine-tuning becomes ungovernable
- [[LoRA]] — Parameter-efficient fine-tuning technique
- [[Dual-Use AI]] — The problem fine-tuning operationalizes
- [[Llama Military Adoption]] — The case study