Home›Topics›Large language models
Large language models Concepts
| Attention and self-attention Attention lets a neural network weigh the parts of its input by relevance. Self-attention applies this idea inside a single sequence, so each token gathers information from every other token. It is the core operation of the Transformer. | |
| Reinforcement learning from human feedback (RLHF) Reinforcement learning from human feedback trains a model toward what people prefer, using a reward model learned from human comparisons of its outputs. It became a standard step in building chat assistants. | |
| Transformer The Transformer is a neural network architecture introduced in 2017 that relies on self-attention instead of recurrence or convolution. Most of today's large language models are built on it. | |
| Pre-training and fine-tuning Pre-training trains a large model on huge amounts of unlabeled text, and fine-tuning then adapts it to a specific task with a small labeled dataset. This two-stage recipe is the basis of the term foundation model. | |
| Retrieval-augmented generation Retrieval-augmented generation (RAG) lets a language model fetch relevant documents from an external store and put them into its prompt before answering, so it can use knowledge beyond its training data and cite where an answer came from. | |
| Scaling laws Scaling laws are empirical trends showing that a language model's test loss falls smoothly, as a power law, when parameters, data and training compute grow. They help plan large training runs and explain the race for compute. | |
| Chain of thought and reasoning models Chain of thought is the technique of having a language model write out its intermediate reasoning before answering. Reasoning models extend it by training the model with reinforcement learning to think at length before responding. | |
| AI agent An AI agent is a system that perceives its environment and acts autonomously toward goals. The term covers everything from a thermostat to LLM-driven software that directs its own tool use. | |
| Quantization Quantization stores a language model's weights and activations at lower numerical precision, cutting the memory and bandwidth that inference requires. Methods such as LLM.int8() and GPTQ made very large models runnable on far smaller hardware. | |
| Hallucination Hallucination is false or misleading information that a model presents as fact. It is a central failure mode of text-generating systems and a main obstacle to trusting their output. | |
| AI alignment Alignment is the problem of making a model's behaviour match what its users and designers actually intend, not just what its training objective literally rewards. Training on human preference comparisons is one practical route to it. | |
| Recurrent neural networks and LSTM A recurrent neural network (RNN) is a neural network with feedback connections that carry information from one step of a sequence to the next. Its long short-term memory variant (LSTM) was designed to keep useful memories over longer spans. | |
| Tokenization Tokenization splits text into the tokens a language model actually reads; most modern systems do it with byte pair encoding, a 1994 compression method adapted for translation in 2015. | |
| Word embeddings A word embedding represents each word as a list of numbers learned from text, so that words used in similar ways get similar lists. Embeddings are a basic building block of modern language models. | |
| Mixture of experts (MoE) A mixture of experts model contains many sub-networks but routes each token to only a few of them. This lets total model size grow while the compute spent on each token stays much smaller than the total. | |
| Tensor Cores Tensor Cores are specialised units inside NVIDIA GPUs that perform a small matrix multiply-and-add in one step, making the matrix arithmetic behind neural-network training and inference dramatically faster. | |
| In-context learning In-context learning is a large language model's ability to perform a new task from instructions and a few examples placed in the prompt, with no weight updates. Named and studied in the GPT-3 paper, it moved adaptation from fine-tuning to prompt writing. | |
| LoRA (low-rank adaptation) LoRA (low-rank adaptation) is a fine-tuning technique that freezes a pre-trained model's weights and trains small low-rank matrices instead, cutting the number of trainable parameters and the memory needed while keeping quality close to full fine-tuning. | |
| Instruction tuning Instruction tuning is a supervised fine-tuning stage that trains a large language model to follow user instructions; the FLAN paper showed it substantially improves zero-shot performance on unseen tasks. | |
| Constitutional AI Constitutional AI is a training method introduced by Anthropic in December 2022, in which a model's behaviour is shaped by a written constitution of principles rather than by human labels of harmful outputs. | |
| Direct preference optimization Direct preference optimization (DPO) is a method for fine-tuning language models on human preference data with a supervised-learning-style objective, removing the separate reward model and the reinforcement-learning loop of standard RLHF. | |
| Prompt injection Prompt injection is an attack in which text inside a model's input overrides its original instructions, letting an adversary hijack a language-model application — including, as researchers showed in 2023, through content the application retrieves on its own. | |
| Llama Community License The Meta Llama 3 Community License is the custom agreement Meta attaches to its Llama 3 models: free to use and modify, but with use restrictions, attribution duties and a user-scale threshold that keep it from being open source in the usual sense. | |
| Test-time compute Test-time compute is the computation a model spends while answering a prompt, beyond what training already fixed into its weights. A 2024 study by Snell et al. showed how to spend it adaptively, and how it can stand in for a bigger model. | |
| Red teaming Red teaming is the practice of actively probing a model for harmful or unwanted behaviour before deployment. A 2022 method by Perez and colleagues automated it by using one language model to generate test cases for another. | |
| Jailbreak A jailbreak is an adversarial prompt that gets a safety-trained model to produce behaviour its training was meant to prevent. A 2023 analysis by Wei et al. traced these failures to competing objectives and mismatched generalization. | |
| Context window A context window is the full span of text a model can refer to while producing a response, measured in tokens and including the response itself. Its size, and how evenly a model uses it, shape what the model can do. | |
| Long context Long context is a model's capacity to take in and work over very large inputs — documents, images, recordings — in a single request. Systems now reach millions of tokens, though finding information inside that window is a separate skill. | |
| KV cache A KV cache keeps the key and value vectors a model has already computed for earlier tokens, so each new token reuses them instead of recomputing. Its memory footprint is what makes high-throughput serving hard to scale. | |
| Prompt engineering Prompt engineering is the practice of designing the text input that steers a generative AI system toward a desired output. Shared vocabulary and techniques such as chain-of-thought prompting make results easier to describe, compare and reproduce. | |
| Synthetic data Synthetic data is training material written by a model rather than collected from people or the web. In the phi-1 experiments a small code model trained partly on model-generated "textbooks" reached competitive benchmark scores, suggesting data quality itself shapes capability. | |
| Tool calling Tool calling lets a language model hand a sub-task, such as arithmetic or search, to an external program and use the result in its answer. Toolformer showed in 2023 that a model could learn when and how to call tools on its own. | |
| Planning in AI agents Planning in AI agents is the process of breaking a goal into intermediate steps, choosing actions, and revising the plan as results arrive, rather than producing an answer in one pass.[^1][^2] | |
| Benchmark contamination Benchmark contamination means the test items a model is evaluated on, or close variants of them, were present in its pretraining data, so scores partly measure memory of seen text rather than the ability the benchmark is meant to probe. | |
| Speculative decoding Speculative decoding speeds up text generation from large autoregressive models: a smaller model proposes several tokens and the large model checks them in parallel, producing identical output faster. | |
| Text watermarking Text watermarking embeds a hidden statistical signal in generated text so that a short span of tokens can later be identified as machine output, while the text still reads normally to people. | |
| Agent memory Agent memory is the part of an agent system that stores information beyond the current context window so it can be recalled later. MemGPT (2023) framed the limited context window as the core constraint such designs must work around. |