Contrast SFT and continued pretraining when adapting a base model to medical text
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.
Detailed answer & concept explanation~8 min readEverything 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. 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.
- Med-PaLM 2 used continued pretraining on biomedical corpora followed by SFT on clinical instruction data, the canonical medical-specialization stack.
- BioGPT extended general LLM training with continued pretraining on PubMed to build a biomedical generation model before any task-specific fine-tuning.
- BloombergGPT 50B used continued pretraining on financial corpora as the dominant adaptation step before instruction tuning.
- Llama 4 Maverick base shows strong medical priors out of pretraining, so many 2026 medical fine-tunes skip continued pretraining and start with SFT plus retrieval.
- Clinical NER fine-tunes for ICD-10 coding use SFT only because the deployment is classification, not chat, so the chat-conventions step is unnecessary.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhat is catastrophic forgetting in continued pretraining and how do you mitigate it?
QWhy does SFT use masked prompts (labels = -100) on the prompt tokens?
QWhen would you choose retrieval over fine-tuning for a medical use case?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
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.
- Singhal et al., Med-PaLM 2: Towards Expert-Level Medical Question Answering
- Luo et al., BioGPT: Generative Pre-trained Transformer for Biomedical Text Generation and Mining
- Wu et al., BloombergGPT: A Large Language Model for Finance
- Gururangan et al., Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
Same topic, related formats. Practice these next.