A large language model reads text and continues it: that is how answers to questions, translation, a document summary or working code come about. “Large” is a matter of history rather than of a formula: that is what models with billions of parameters are called, trained on corpora of trillions of tokens.
How a model is trained
At the core is the transformer architecture: the attention mechanism lets each token attend to the other tokens in the context. Training proceeds in several stages.
| Stage | What happens | Result |
|---|---|---|
| Pre-training | the model predicts the next token on a corpus of trillions of tokens | a base model: it knows the language and the facts, but has not been trained to answer |
| Fine-tuning (SFT) | the model is trained on examples of dialogues and instructions | the model follows instructions |
| RLHF | the model’s answers are compared and adjusted against human preferences | the answers become more useful and safer |
Where they are used
- chatbots and assistants — answering questions, working with documents;
- help with programming — completing and explaining code;
- knowledge base search together with RAG: the model answers from the retrieved fragments;
- data extraction: summarisation, classification, translation, parsing emails.
The transformer architecture was proposed in 2017 in the paper “Attention Is All You Need”. Scale became the main direction: in 2020 GPT-3 was trained with 175 billion parameters, and the model solved new tasks from a few examples in the prompt. It later turned out that scale is not everything: the answers of InstructGPT, a model fine-tuned on human preferences with 1.3 billion parameters, were rated higher than those of the original GPT-3 with 175 billion.
Sources
the term is written from these pages- Vaswani et al. — Attention Is All You Need (2017)arxiv.org/abs/1706.03762(opens in a new tab)
- Brown et al. — Language Models are Few-Shot Learners (GPT-3, 2020)arxiv.org/abs/2005.14165(opens in a new tab)
- Meta — Llama 3 model card (2024, pretraining on 15T+ tokens)github.com/meta-llama/llama3/blob/main/MODEL_CARD.md(opens in a new tab)
Verified 9 Nov