What Is Pretraining?
What pretraining is, why it is so costly, what a base model can and cannot do, explained simply for your AI interview.
In short
Pretraining is the first, huge training run, in which a model learns language by predicting the next word in a vast pile of unlabelled text. The result is a base model, which is then fine-tuned, meaning trained further on a smaller set of examples, for real jobs.
11 min readBeginnerVery common · estimateFacts checked 26 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
Pretraining is the first, big training run. The model reads a huge amount of text that nobody labelled, and it learns by guessing the next word, again and again. The result is a base model. It knows language well, but it doesn't follow orders yet. Google's course says you probably will never train an LLM from scratch, so you start from a base model, then add your own data and tests.
Pretraining is the first stage of building a language model, and it is very expensive. The model reads a huge amount of text that nobody has labelled. It is shown a sentence with the next word hidden, guesses it, and adjusts itself when it is wrong. Repeat that over an enormous pile of text, and the model picks up grammar, style and a lot of general knowledge.
I think of it like a new analyst at a bank. Before touching a real customer file, they read years of policy documents, filings and manuals. That reading gives them the basics of the job, but it does not teach them this month's refund rules. In an AI product, a base model from pretraining can write clear English, yet it has never seen the bank's own fee table.
So the usual next step is fine-tuning. We train the base model further on examples of good answers. Fine-tuning and RLHF then refine it to be more useful as an assistant. Google's course says training an industrial-strength LLM requires enormous amounts of ML expertise, computational resources, and time.
For the bank's support bot, I would not pretrain. I would start from a good base or chat model, keep the fee table in a search the bot reads at answer time, and test the answers against real tickets.
What is pretraining, in plain words?
Pretraining is the first big training run of a language model. Before the model can answer questions or follow instructions, it learns the basics of language from a huge amount of text.
Nobody labels that text, and there is no answer key. The task is simple: hide the next word, guess it, check the guess, and nudge the model so the next guess is a little better. Because the text comes from the world, the model picks up grammar, style and general facts along the way.
The analogy I use is a new analyst at a bank. Before touching a real customer file, they read years of policy documents, filings and manuals. That reading gives them the basics of the job. It does not teach them this month's refund rules. A real AI case works the same way: a base model from pretraining can write clear English, but it has never seen the bank's own fee table.
Key words
- Pretraining
- The first, big training run on a huge pile of text, with no labels.
- Base model
- What pretraining produces: good with language, not yet good at following orders.
- Unlabelled text
- Text with no answer key attached, such as web pages and books.
- Next-word prediction
- The simple task the model practises: guess the next word, check it, adjust.
How does pretraining work, step by step?
The loop is simple. The scale is what makes it hard.
- 1
Gather the text
Collect a very large amount of text. Google's course says this training text is typically somewhat filtered.
- 2
Hide the next word
Show the model some text and ask it to guess what comes next.
- 3
Score the guess
Compare the guess with the real word. A wrong guess counts as an error the model must reduce.
- 4
Adjust and repeat
Nudge the model's numbers, its weights, the numbers inside the model, so the error is smaller next time. Keep going for a very long run.
From raw text to an assistant
A huge amount of text
nobody labelled it
Pretraining
guesses the next word, over and over
Base model
predicts text, does not follow orders
Fine-tuning
more training on good answers
Assistant
answers and follows instructions
- 1Huge piles of text go in, with no labels attached.
- 2The model guesses each next word, and adjusts when it is wrong.
- 3The base model is then fine-tuned on examples of good answers.
- 4The result is an assistant that follows instructions.
Here is a tiny version of the first idea. It counts which word follows which, and it adjusts no weights, so it is not real training.
# A tiny version of next-word prediction: count which word follows which.
# Real models learn these patterns with a neural network, from far more text.
from collections import Counter, defaultdict
corpus = [
"the refund is sent within five working days",
"the refund is not sent to closed accounts",
"the fee is waived for premium accounts",
"the fee is charged on late payment",
"the card is blocked after three wrong pins",
]
counts = defaultdict(Counter)
for line in corpus:
words = line.split()
for word, nxt in zip(words, words[1:]):
counts[word][nxt] += 1
for word in ["the", "refund", "fee"]:
best, n = counts[word].most_common(1)[0]
total = sum(counts[word].values())
print(f"after '{word}': most likely '{best}' ({n} of {total})")Output
after 'the': most likely 'refund' (2 of 5) after 'refund': most likely 'is' (2 of 2) after 'fee': most likely 'is' (2 of 2)
Google's course calls this first phase unsupervised learning, meaning learning with no answer key. Some setups hide words in the middle of the text and ask the model to fill them in. BERT, a 2018 paper, is built to pre-train on unlabelled text by reading the context on both sides of a word.
Research from 2020 found that the loss, a score for how wrong the model is, falls in a steady pattern as the model, the data and the compute grow.
Why is pretraining so costly, and who actually does it?
Pretraining needs a huge amount of text, a large set of computers running for a long time, and specialist skill. Google's course tells learners that they will probably never train an LLM from scratch.
“Pretraining is the initial process of training language models on a large unlabeled corpus of text”
Anthropic glossary
“You probably will never train an LLM from scratch.”
Google, LLM course
“first we train a transformer model on a very large amount of data in an unsupervised manner”
OpenAI, 2018
OpenAI's 2018 post on this approach said its pre-training step was expensive, about one month on 8 GPUs, the chips that do this maths.
- Costly
Pretrain from scratch
Huge data, a long run and expert staff. Google's course says learners probably never will train one.
- Practical
Start from a base model
Someone else already did the big run. You add your data and tests on top.
What does pretraining give a model, and what does it miss?
Take a mid-size bank's support bot, built on a base model. A customer asks what the premium card charges for a late payment. The bot writes a clear, polite reply, and that part comes from pretraining. But the reply quotes a fee from a different card's public page, because the bank's own fee table was never in its training.
Pretraining gives the model language and general knowledge. It does not give the model your bank's current rules, and general knowledge can be old or thin for your case. The fix is to let the bot read the live fee table when it answers. The cost is a search index to run and a set of real customer questions to test against.
What pretraining gives, and what it misses
Base model
learned from public text
It already has
Fluent English
sentences that read naturally
General facts
old or thin for your bank
It never saw
Your fee table
the bank's private rules
Last week's change
after its training data ends
Retrieve your docs
the bot looks up the live table
Grounded answer
quotes the current fee
- 1Pretraining gave the model its language and its general knowledge.
- 2The bot searches the bank's own fee table when the question arrives.
- 3The answer is built from the table it just found, not from memory.
How would you decide whether your team needs pretraining?
- 1
Test a base or chat model first
Run it on about 200 real support tickets and mark each answer right or wrong.
- 2
Name the gap
Wrong facts point to retrieval, because the model needs the current documents. Wrong tone or format points to fine-tuning. Neither points to pretraining.
- 3
Weigh the cost last
Pretraining means a long, costly run with its own team and risk. A fee table is never a reason to start a pretraining run.
Tip
Say the order out loud: test, find the gap, then pick the fix. That sounds like a plan to an interviewer.
What does the interviewer want to hear?
A strong answer covers
- A plain definition: a big first training run on unlabelled text that teaches the model language.
- The task: predict the next word, check the guess, adjust.
- The output: a base model, which still needs fine-tuning to follow orders.
- Why it is costly: data, computing power, time and specialists.
- Google's course says you probably will never train an LLM from scratch, so start from a base model.
- Where it stops: general knowledge, not your private rules or this month's changes.
Common traps
Trap"The model was trained on our data, so it knows our policies."
BetterPretraining is a general training run. Your rules come from retrieval or fine-tuning, plus tests.
Trap"Pretraining is just fine-tuning with more data."
BetterPretraining is the big first run on unlabelled text. Fine-tuning is a smaller, later run on examples.
Trap"A bigger pretraining run always makes a better product."
BetterModel quality helps, but the product also needs good data, retrieval and tests.
Can you spot the mistake?
Spot the mistake
Which of these claims about pretraining is wrong?
Quick check
A bank wants its bot to follow this month's refund rules. What is the best first move?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
- Q016Pretraining vs fine-tuning vs instruction tuning?10 min
- Q017Base model vs chat/instruct model?11 min
- Q018What are parameters (weights)?11 min
- Q019What are scaling laws?10 min
- Q020What is compute-optimal (Chinchilla-style) training?Coming soon
Learn it in depth
Last updated on 26 November 2026
Planning to train or fine-tune a model for your product?
I design and build AI products and agents, the interface and the system behind it. Book a short call and tell me what data you have and what the model must do.