Part 1 · Model Factory

Understand what weights are, how training creates them, and how product choices become a deployable model artifact.

Prompt, retrieve, tune, or train · 8 min

Choose how to adapt

Different problems call for prompting, retrieval, fine-tuning, continued pretraining, or training from scratch.

Essential path

Plain language, the core causal flow, and required checks.

Four ways to get a model that knows your business

Choose the least expensive intervention that solves the actual problem.

ApproachWhat changesBest fitBusiness example
PromptingInstructions and examples sent with each requestClarifying a task, format, role, or policyAsk for an incident summary in the company’s standard five headings
Retrieval (RAG)Current source material is added to the request contextChanging facts that must be cited or updatedRetrieve the latest product catalog and support policy before answering
Fine-tuningSome or all model weights changeStable behavior, tone, format, or a narrow taskTrain on approved escalation examples so outputs follow the house workflow
Pretraining from scratchA new base model and its broad capabilities are createdExceptional scale, sovereignty, language, or genuinely unique data domainsBuild a sovereign-language foundation model when no suitable base can be used

Most organizations should begin with prompting, add retrieval for current knowledge, and change weights only when behavior—not merely facts—must change. Pretraining from scratch is rarely the right business adaptation strategy.

Prompting and retrieval leave the base weights alone

Prompting is instant and reversible. Retrieval keeps knowledge outside the model, so updating or rolling back the source updates behavior without a training run. Retrieval still needs good chunking, ranking, permissions, citations, and evaluation; it is not automatically grounded just because documents were fetched.

Fine-tuning changes behavior

Full fine-tuning updates every trainable weight and can achieve the highest adaptation ceiling, but it consumes substantial memory and creates a complete model variant. Narrow data can also cause catastrophic forgetting.

LoRA freezes the base and learns two thin matrices whose product forms a full-shaped update. That makes one base reusable across many small adapters.

Inspect a LoRA update

Core + Expert

Low-rank adaptation

Keep the base fixed and learn two thin matrices

interactive explanation

LoRA does not retrain every value in W. It learns A and B, multiplies them into a full-shaped adjustment, and adds that adjustment to the frozen base.

Base matrix W · train every valuegradients update W
A · 8 × 4096thin
×
B · 4096 × 8thin
Inserted after the base is frozen
Full-shaped adjustmentΔW = B × A
Effective weightsW

Full fine-tuning changes the complete base matrix.

Trainable parameters≈ 7,000M
Share of 7B model100%
Base storage14 GB

Compare fine-tuning methods

Compare fine-tuning methods

Core + Expert

Adaptation method comparison

See where each adaptation method intervenes

interactive explanation

Compare what moves, what stays frozen, how much state training owns, and what cost remains during inference.

Embeddings
Attention
Feed-forward
Layer norms
Output head
Trainable share100%
Training memoryVery high
Inference costNone
Best fitMaximum capacity
  • QLoRA keeps the frozen base quantized while training LoRA parameters.
  • Adapters insert small permanent modules and therefore add inference work.
  • Prefix or prompt tuning learns virtual input tokens but consumes context.
  • Head-only training is a useful low-cost baseline.
After this chapter, you can:
  • Choose the least costly method that changes the needed behavior.
  • Separate adding knowledge at request time from changing weights.

Which approach adds changing knowledge without modifying weights?