- Type
- Machine learning training stage
- Also known as
- Pre-training, foundational training
- Typical data
- Unlabelled text, code, images, audio
- Objective
- Self-supervised prediction of hidden data
- Typical cost
- Millions of USD for frontier-scale runs
- Related
- Foundation models, Fine-tuning, RLHF, Transformers
- Type
- Machine learning training stage
- Also known as
- Pre-training, foundational training
- Typical data
- Unlabelled text, code, images, audio
- Objective
- Self-supervised prediction of hidden data
- Typical cost
- Millions of USD for frontier-scale runs
- Related
- Foundation models, Fine-tuning, RLHF, Transformers
History
The pretraining paradigm replaced earlier approaches in which each application needed its own hand-labelled dataset. Early deep learning systems were trained from scratch on narrow, curated corpora. The shift began with unsupervised pretraining in the 2000s–2010s and was cemented by language models trained to predict the next word at scale: Google's BERT (2018) showed that a model pretrained with a masked-token objective could be fine-tuned to lead a wide range of language benchmarks,[2] while OpenAI's GPT series demonstrated that increasing model size, data and compute on the same simple objective produced steadily stronger general capabilities.[3]
Research on scaling laws quantified this relationship, showing that loss falls as a smooth power law in model size, dataset size and compute,[4] and later work showed that at fixed compute, spending more on data can be more efficient than growing the model — a finding that reshaped how labs allocate training budgets.[5] By the 2020s, pretraining had expanded beyond text to images, audio, video, protein sequences and robotic sensor data.
Key Concepts
Pretraining is self-supervised: the labels come from the data itself. In a language model the task is to predict the next token given the preceding context; in an image model it may be to reconstruct a masked patch. Because no human annotation is required, training can consume trillions of tokens scraped from the web, books, code repositories and archives.
The process has three moving parts: a corpus (collected, deduplicated, filtered and tokenised), an architecture (usually a transformer), and an objective (cross-entropy loss minimised by stochastic gradient descent over thousands of accelerators). Checkpointing, mixed-precision arithmetic and distributed training make runs of this scale practical.[6]
Crucially, pretraining produces capability, not behaviour. A raw base model completes text; it does not reliably follow instructions or refuse harmful requests. Alignment stages — supervised instruction tuning and RLHF — are applied afterwards to shape how the pretrained capability is expressed.[1] This division of labour is why teams routinely reuse a pretrained model instead of repeating the costly pretraining stage.
Impact
Pretraining is what makes modern AI general-purpose and reusable. The economics are decisive: a single pretraining run can cost millions of dollars in compute, whereas fine-tuning, quantization or retrieval-augmented generation (RAG) adapt a model for a fraction of that.[7] Organisations therefore choose among three strategies — pretrain from scratch for full control and novel capability, fine-tune an existing model for domain fit, or leave the model untouched and supply knowledge at inference time through RAG — with cost and data sensitivity determining the choice.
>Key Takeaways
- Pretraining is the expensive, unlabelled-data stage that produces general capability; alignment and fine-tuning come after.[1][3]
- Quality and quantity of data matter as much as parameter count — compute-optimal training favours more data.[4][5]
- Almost all organisations should adapt or query a pretrained model rather than pretrain their own.[7]
- Malaysia's edge is Malay-language pretraining and sovereign data, not frontier-scale runs.[8][9]
See Also
🇲🇾 Relevance to Malaysia: almost no Malaysian organisation undertakes frontier-scale pretraining; the economics (accelerators, energy, research talent) sit with global hyperscalers and large labs. What Malaysia does do is continue pretraining on local data: Mesolitica's MaLLaM family was pretrained from scratch on a Malay-centric corpus of roughly 90 billion tokens to capture dialects and code-switching that global models handle poorly,[8] and YTL AI Labs' ILMU was built with Universiti Malaya around Bahasa Melayu, Manglish and regional dialects.[9] Both illustrate the pragmatic Malaysian position — sovereign capability where language and data justify it, adoption of pretrained open-weight models everywhere else.
For Malaysian businesses the practical guidance is to start from a pretrained base or instruction-tuned model and invest in fine-tuning or RAG only where a demonstrable gap exists. That choice interacts with national infrastructure: the growth of AI data centres in Johor and elsewhere lowers the cost of hosting and adapting pretrained models,[10] while the Personal Data Protection Act constrains what local customer data can be mixed into any further training.[11] NAIO's programme work likewise emphasises adoption and skills over model building from scratch.[12]
References
- ↑Stanford HAI. Foundation Models. https://hai.stanford.edu/foundation-models
- ↑Devlin, J. et al. (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv. https://arxiv.org/abs/1810.04805
- ↑Brown, T. et al. (2020). Language Models are Few-Shot Learners. arXiv. https://arxiv.org/abs/2005.14165
- ↑Kaplan, J. et al. (2020). Scaling Laws for Neural Language Models. arXiv. https://arxiv.org/abs/2001.08361
- ↑Hoffmann, J. et al. (2022). Training Compute-Optimal Large Language Models (Chinchilla). arXiv. https://arxiv.org/abs/2203.15556
- ↑Distributed training and mixed-precision practice. https://pytorch.org/tutorials/recipes/zero_redundancy_optimizer.html
- ↑CoreWeave. Pretraining vs. Fine-Tuning vs. RAG: Choosing the Right Approach. https://www.coreweave.com/blog/pretraining-vs-fine-tuning-vs-rag-whats-best-for-your-ai-project
- ↑Mesolitica. MaLLaM — Malaysia Large Language Model (2024). https://arxiv.org/abs/2401.14680
- ↑YTL AI Labs. ILMU: A Malaysian Large Language Model. https://ytlai-labs.com/
- ↑AIWiki. AI Data Centres in Malaysia. https://aiwiki.com.my/wiki/ai-data-centres-malaysia
- ↑AIWiki. PDPA Malaysia. https://aiwiki.com.my/wiki/pdpa-malaysia
- ↑AIWiki. National AI Office Malaysia. https://aiwiki.com.my/wiki/national-ai-office-malaysia