Pretraining
Pretraining is the first, most compute-intensive stage of training a foundation model — typically self-supervised next-token prediction over trillions of tokens of text, code, and other modalities — that produces the base model later fine-tuned for specific tasks.
AIDOLS Research Team · Editorial standards
Full definition
Pretraining a frontier LLM today takes months of compute on thousands of accelerators, at a cost of tens to hundreds of millions of dollars (Epoch AI's median estimate for Grok 4, released in 2025, is about $490 million). It produces a "base model" — knowledgeable but not yet helpful — which is then post-trained (instruction tuning, RLHF, RLAIF) into the chat assistants users interact with. Most enterprises do not pretrain; they consume pretrained foundation models and adapt them.
Why it matters
Pretraining capital costs have created a small set of frontier model providers (OpenAI, Anthropic, Google, Meta, xAI, Mistral). For most enterprises this is good news: the heavy lift is amortized across the industry. The strategic decision is which foundation models to standardize on, not whether to pretrain.
Example
Meta's Llama 3.1 405B was pretrained on 15.6 trillion tokens using over 16,000 H100 GPUs — a multi-month effort whose compute the Stanford AI Index estimates at about $170 million, which any downstream user gets to inherit by downloading the open weights.
Next steps
Related terms
- Foundation ModelA foundation model is a large model trained on broad data at scale — typically self-supervised — that can be adapted to many downstream tasks via prompting, fine-tuning, or retrieval, instead of being trained task-by-task.
- Fine-TuningFine-tuning is the process of further training a pretrained model on a smaller, task-specific dataset so it specializes in a particular style, domain, or behavior — without retraining from scratch.
- Transfer LearningTransfer learning is the practice of using a model trained on one task as the starting point for a related task, dramatically reducing the data and compute required to reach high accuracy on the new task.
- Training DataTraining data is the curated dataset used to teach a machine-learning model — every pattern the model can recognize, every bias it inherits, and every limit to its accuracy ultimately traces back to this data.
- Large Language Model (LLM)A Large Language Model (LLM) is a deep neural network — almost always a transformer — trained on hundreds of billions to trillions of words to predict the next token, and to generate, summarize, translate, or reason over text.
More training & optimization terms
- Few-Shot / Zero-Shot LearningFew-shot learning is the ability of a model to perform a new task given only a handful of examples at inference time; zero-shot learning is the same idea with no examples — the model relies entirely on its pretraining and the natural-language instruction.
- Prompt EngineeringPrompt engineering is the practice of designing the inputs to a language model — instructions, examples, role definitions, output formats, and constraints — to reliably produce a desired output without changing the model's weights.
Source & further reading
Primary source: Meta AI — "The Llama 3 Herd of Models" (2024).
Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/en/glossary/pretraining/.