Bookmarks

LLM — large language model

A transformer neural network trained on a large text corpus to predict the next token, and therefore able to solve natural-language tasks.

Also: language model, large language model, LLM

checked 9 Nov

All terms

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.

StageWhat happensResult
Pre-trainingthe model predicts the next token on a corpus of trillions of tokensa 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 instructionsthe model follows instructions
RLHFthe model’s answers are compared and adjusted against human preferencesthe 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

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

In depth in the references

where the topic is covered in detail