Skip to main content
Training & Optimization

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

More training & optimization terms

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/.