Contrast SFT and continued pretraining when adapting a base model to medical text
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A team wants to specialize a general base model on medical content. Contrast supervised fine-tuning and continued pretraining as the adaptation method, what each objective looks like, what each one actually changes inside the model, and how a serious team would combine them.
Continued pretraining shifts what the model knows via raw next-token on unlabeled corpora; SFT shifts how the model responds via (instruction, response) pairs. Stack them: pretraining first, SFT second.
Imagine training a doctor for a new specialty. One way is to lock them in a library full of medical journals and have them read for months until the vocabulary, the diagnoses, the drug names, and the rare diseases all become second nature. They walk out knowing the subject cold but unsure how to actually talk to a patient. The other way is to hand them a thick book of example patient conversations and teach them exactly how a good doctor responds in each one. They learn bedside manner perfectly, but if they did not read the journals first, they will sometimes give confident answers about diseases they do not really understand. A serious training program stacks both: first the reading, then the practice conversations. Skip either step and the doctor either knows everything or sounds professional, but rarely both.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: the two objectives compared, what each changes in the model, the canonical stack order, catastrophic forgetting and its mitigations, the data shape and volume for each step, and when to skip either.
| Aspect | Continued pretraining | SFT |
|---|---|---|
| Objective | Next-token on raw corpus | Next-token on instruction-response, prompt masked |
| Data shape | Unlabeled domain text | Paired (instruction, response) examples |
| Data volume | Billions of tokens | 5k to 50k high-quality pairs |
| What changes | Knowledge prior, latent geometry | Behaviour, format, instruction following |
| Failure if alone | Knows domain, cannot hold a conversation | Follows format, hallucinates on unknowns |
| Risk | Catastrophic forgetting of general capability | Overfitting to labellers, format brittleness |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating SFT on medical Q&A pairs as sufficient for domain adaptation. SFT teaches format and style; it cannot patch underlying knowledge gaps in the base model.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.