Pretraining vs fine-tuning: what training an AI really means
In January, South Korea’s science ministry knocked Naver Cloud out of its national AI model contest. Naver’s model had passed the benchmark tests. What sank it was a question that sounds almost philosophical: had Naver actually trained its AI from scratch?
Part of Naver’s model, a vision encoder (the piece that turns images into something the model can read), came from Alibaba’s open-source Qwen, according to reporting by Digital Today and The Asia Business Daily. The ministry ruled that this failed its independence test. Its line was that open source is fine, but that it is a minimum requirement to “initialize the weights and then proceed with training and development.”
If that sentence means nothing to you, it is worth ten minutes, because it describes how chatbots get made. “Training” is not one event. It is at least two, and they are wildly different in size.
Stage one: the long read
Start with the weights. A model is, in the end, a very large set of numbers, billions of them, that decide what comes out when text goes in. Before training, those numbers are random. The model knows nothing. That is what “initializing the weights” means: setting every number to a starting value and beginning from zero. It is the step Korea insisted its national teams do themselves.
Then comes pretraining. The model is shown an enormous amount of text and asked, over and over, to guess the next piece. Each wrong guess nudges the numbers slightly. Do that across trillions of tokens and the numbers end up holding grammar, facts, the shape of an argument, the way code is laid out.
Here is the analogy we think holds. Pretraining is a child who has read the entire library but has never been spoken to. They know an astonishing amount about how sentences go. Ask them a question, though, and they may just carry on writing your question, because nobody has taught them that a question expects an answer.
The scale is striking. Google’s model card for Gemma 2, an open model, says the 9-billion-number version “was trained with 8 trillion tokens”, mostly English web pages plus code and mathematics. (A token is a piece of a word, which we explained here.)
[[photo:1]]
Stage two: the short apprenticeship
Fine-tuning takes that well-read but unhelpful model and teaches it a job. Usually the job is “be an assistant”: here is a request, here is a good reply, now do that. There are far fewer examples than in the long read, and they are chosen with care.
The clearest evidence that this stage matters came from OpenAI. In a 2022 paper on InstructGPT, a model fine-tuned on answers written and ranked by hired labellers, its researchers wrote that “making language models bigger does not inherently make them better at following a user’s intent.” In their tests, people preferred answers from a fine-tuned model with 1.3 billion numbers over answers from the original GPT-3, which had 175 billion. A much smaller model, given a short apprenticeship, beat a giant that had only done the reading.
So when a chatbot is polite and answers the question you actually asked, our reading of that evidence is that the manners were mostly taught in this second, smaller stage. The knowledge mostly came from the first.
A family tree you can read yourself
There is often a middle step too, and the best example in our region is open for anyone to inspect. Sahabat-AI (“close friends” in Indonesian) is a model built by GoTo, the company behind Gojek and Tokopedia, with AI Singapore. Its public model cards on Hugging Face spell out its ancestry, one generation at a time:
- Google’s Gemma 2 9B. The pretrained root: 8 trillion tokens.
- AI Singapore’s SEA-LION v3. Gemma 2 given what the card calls “continued pre-training” on about 200 billion more tokens across 11 Southeast Asian languages, from Malay and Tamil to Khmer and Burmese. That took 10 days on 64 Nvidia H100 chips.
- Sahabat-AI base. SEA-LION read further, about 50 billion tokens, more than half of it Indonesian, plus Javanese and Sundanese. Seven days on 32 chips.
- Sahabat-AI Instruct. The apprenticeship: around 448,000 Indonesian instruction-and-answer pairs, plus smaller sets in Javanese, Sundanese and English. The card says fine-tuning took “approximately 4 hours, with alignment taking 2 hours”.
Each step is smaller than the last. The extra regional reading is roughly a fortieth of what Google started with. And the step that turns it into something you can chat with is measured in hours.
One more line on that card is worth knowing. It says current Sahabat-AI models “have not been aligned for safety” and tells developers to add their own safety fine-tuning. Safety behaviour, in other words, is another layer somebody has to choose to add. It does not come free with the knowledge.
[[photo:2]]
See it on your own screen
You can check this family tree in under a minute, no account needed:
- Open huggingface.co and search for sahabatai instruct.
- Open GoToCompany’s “gemma2-9b-cpt-sahabatai-v1-instruct” page.
- Scroll to the Model tree section. It shows the base model this one was built on. Follow it back, and you reach google/gemma-2-9b.
This only works for open models whose makers publish their cards. The big closed chatbots do not show you their trees, although OpenAI’s InstructGPT paper describes the same two broad stages.
What this changes about how you read AI news
Once you can tell the stages apart, a lot of headlines get easier to judge. When a company announces “our own AI”, the useful question is which stage it actually did. Training from random numbers, as Korea demanded, means doing the full long read yourself: 8 trillion tokens, in Gemma’s case. Fine-tuning someone else’s model can take hours, as Sahabat-AI’s card shows. Neither is cheating. They are just different claims, and Korea’s row shows that even experts disagree on where the line should sit: one Kyung Hee University professor told Digital Today, “There is a need to reconsider treating from scratch as the core.”
It also explains why a chatbot can sound perfectly confident and still be wrong. The confidence comes from the apprenticeship. The facts come from the long read, and the long read is far too big for anyone to check line by line. That gap is where made-up answers come from, and it is why a short “be helpful” lesson cannot fully close it.
Next time a model is introduced as a breakthrough, try asking one question of it. Built from scratch, or built on what?
Was this useful?
Sources
- google/gemma-2-9b model card · Google (Hugging Face)
- aisingapore/gemma2-9b-cpt-sea-lionv3-base model card · AI Singapore (Hugging Face)
- Gemma2 9B CPT Sahabat-AI v1 base model card · GoTo and AI Singapore (Hugging Face)
- Gemma2 9B CPT Sahabat-AI v1 Instruct model card · GoTo and AI Singapore (Hugging Face)
- Training language models to follow instructions with human feedback · Ouyang et al., OpenAI (arXiv)
- 'From scratch' debate shakes Korea's sovereign AI foundation model project · Digital Today
- Naver Cloud and NC AI eliminated in first evaluation of sovereign AI project · The Asia Business Daily