Skip to main content
Independent Digital Museum of Artificial IntelligenceELEL

Room 6, the production line

How an LLM is made today

A modern language model is not written line by line by programmers. It passes through a sequence of stages, more like a production line, involving data, compute, training, evaluation and deployment. Each stage adds capabilities and introduces trade-offs.

Guiding questionWhat does it take for an LLM to produce an answer?

Explore in 3D →

Interactive process · Room 6

Follow an LLM from data to use

The seven exhibits in this room become one connected process. Run each stage and inspect what goes in, what changes and which limitation remains.

Teaching simulation: the sequence follows the seven exhibits in Room 6. The small probabilities, token examples and responses shown here are curatorial examples. No real LLM is trained in your browser.

Exhibits in this room

Independent Digital Museum of Artificial Intelligence diagram. Four squares in a row whose lines meet below in a single shared line.
Diagram by the Museum of AI
Step 1/7

Data collection

Huge quantities of text are gathered from sources such as websites, books and code. Selection and cleaning influence what a model can learn, how well it performs and which biases it may reproduce.

Independent Digital Museum of Artificial Intelligence diagram. A row of four rectangles of different widths, placed side by side.
Diagram by the Museum of AI
Step 2/7

Tokenization

Text is split into smaller units called tokens, which may be whole words or pieces of words. The model processes numerical identifiers rather than written characters directly.

Photograph of a computer cluster with NVIDIA Tesla graphics cards. Illustrative computing infrastructure.
Photographic reproduction / documentation · Image source
Step 3/7

Pretraining

The model repeatedly learns to predict the next token across enormous text corpora and large amounts of computing. This stage gives it broad language ability and general patterns, but not necessarily assistant-like behaviour.

Independent Digital Museum of Artificial Intelligence diagram. A document with three lines of text and an arrow pointing to a smaller box.
Diagram by the Museum of AI
Step 4/7

Instruction tuning

With examples of instructions and high-quality answers, the model is trained to follow requests and behave more like an assistant.

Independent Digital Museum of Artificial Intelligence diagram. Two circles with a check mark, joined by an arrow from the first to the second.
Diagram by the Museum of AI
Step 5/7

Alignment

People, and sometimes other models, evaluate answers. Training then pushes the model toward responses judged more helpful, honest or safe. A well-known approach is reinforcement learning from human feedback (RLHF).

Independent Digital Museum of Artificial Intelligence diagram. A shield with a check mark in the middle.
Diagram by the Museum of AI
Step 6/7

Testing and safety

Before release, models are evaluated for errors, harmful behaviour and misuse. Testing and monitoring can continue after deployment.

Independent Digital Museum of Artificial Intelligence diagram. A box with an arrow to a second box, which has a circle with a plus sign in the middle.
Diagram by the Museum of AI
Step 7/7

Use

When you type a prompt, a basic language model does not retrieve a ready-made answer from a database. It generates a response token by token, although some modern systems can also call search engines, tools or external knowledge sources.

Before you move on

The model is only one part of the system

What the user experiences is the result of an entire production chain. That matters when judging cost, behaviour, safety, rights and environmental impact.