What is a Large Language Model?

A Large Language Model (LLM) is a type of artificial intelligence system trained on vast quantities of text to predict, understand, and generate human language with remarkable fluency. LLMs matter because they represent the first AI systems capable of general-purpose language tasks — translation, summarization, coding, reasoning, and conversation — without being explicitly programmed for each task. Remarkably, many of their most impressive abilities, such as solving math problems or writing poetry, were never directly taught: they emerged spontaneously from the sheer scale of training.

The core insight

The single most important idea behind an LLM is deceptively simple: predict the next word, over and over, on an enormous amount of text, and something profound happens. A model trained to finish sentences eventually has to learn grammar, facts, logic, tone, and even social nuance — because all of those things influence what word comes next. The "aha moment" is realizing that one humble task, repeated billions of times across billions of sentences, quietly forces a machine to build a surprisingly rich model of how human knowledge and language fit together.

How It Works

At the heart of every LLM is a surprisingly old idea: language has patterns. The word "sunny" is more likely to follow "a beautiful" than "a refrigerator." The word "the" almost never follows another "the." An LLM learns these patterns — at every level of abstraction, from spelling to storytelling — by reading more text than any human could read in thousands of lifetimes. Here is the basic pipeline, step by step, in plain English.

Step 1 — Breaking language into tokens. Before a model can read text, it converts words (and parts of words) into numbers. The word "unbelievable" might become three numeric tokens: "un," "believ," and "able." This chunking is called tokenization, and it lets the model handle any word, even ones it has never seen, by recognizing familiar pieces.

Step 2 — Turning tokens into meaning-clouds. Each token is mapped to a long list of numbers called an embedding. Think of it as a coordinate in a vast meaning-space, where "king" and "queen" sit close together, and "banana" sits far away from both. The model learns these positions during training, arranging words so that similar meanings end up near each other in this invisible conceptual map.

Step 3 — Attention: reading with context. This is the breakthrough that made modern LLMs possible, introduced in the landmark 2017 paper Attention Is All You Need by Vaswani and colleagues. When processing any word in a sentence, the model doesn't read it in isolation — it weighs every other word in the surrounding context and asks: how relevant is each other word to understanding this one right now? The word "it" in "The bank was steep, and it eroded quickly" should attend heavily to "bank" and "eroded" to correctly resolve that "it" means the riverbank, not a financial institution. This mechanism, called self-attention, lets the model resolve ambiguity and track long-range relationships across an entire passage.

Step 4 — Layers upon layers. A single attention step is just the beginning. Modern LLMs stack dozens or even hundreds of these attention-and-processing layers on top of one another. Each layer refines the model's understanding: early layers might detect grammar, middle layers might detect topics, and deep layers might encode abstract reasoning patterns. GPT-4, for example, is widely believed to use well over 100 such layers.

Step 5 — Predicting the next token. After all those layers of processing, the model outputs a probability distribution over every token in its vocabulary — essentially a ranked list of "what word is most likely to come next?" It might say: "the" has 30% probability, "a" has 20%, "one" has 8%, and so on. During training, the model is penalized every time it guesses wrong, and those penalties are used to slightly adjust all those billions of dials. Repeat this adjustment trillions of times, and the model gets very, very good.

researcher · Ashish Vaswani | b. 1983 | Inventor of the Transformer Architecture

Ashish Vaswani was a researcher at Google Brain when he co-authored the 2017 paper Attention Is All You Need, which introduced the Transformer — the architectural foundation upon which virtually every modern LLM is built. His insight was that attention mechanisms alone, without the recurrent loops that previous language models relied on, were sufficient to model language — and that this approach could be massively parallelized on modern hardware, enabling unprecedented scale. Surprisingly, Vaswani and several of his co-authors left Google shortly after this world-changing paper to found or join AI startups, illustrating how rapidly the field was moving.

Figure
How a Large Language Model Processes Text
Inside a Large Language Model: Text → Tokens → Meaning → Prediction RAW TEXT "The cat sat" TOKENIZER [34, 7, 891] EMBEDDINGS meaning vectors TRANSFORMER LAYERS (attention × N) PREDICTION "on" → 42% SELF-ATTENTION (zoom) The cat sat Each token attends to all others Modern LLMs stack 96–200+ transformer layers and use trillions of training tokens
Figure
The LLM Training Pipeline
Three Phases of Building a Modern LLM ① PRETRAINING Trillions of words from the internet, books, and code. Goal: predict next word accurately. Weeks on thousands of GPUs. ② INSTRUCTION TUNING Show the model human-written Q&A examples. Goal: learn to follow instructions helpfully. ③ RLHF Humans rate outputs; model learns to prefer better ones. Goal: align responses with human values and preferences. ChatGPT used this.

Intuition

The Mental Model

Imagine you want to become fluent in cooking without ever taking a lesson. You read every cookbook, food blog, restaurant review, and culinary history ever written — millions of them. After enough reading, you'd start to notice deep patterns: what flavors pair together, how professional chefs think about texture, why certain techniques exist. You didn't memorize any one recipe; instead, you built an intuition about cooking that lets you improvise, adapt, and even invent dishes. An LLM does something similar with language. It reads so much text — think of every Wikipedia article, countless books, decades of internet discussion, scientific papers, news articles, and source code — that it absorbs not just vocabulary but the structure of arguments, the rhythm of stories, the logic of proofs, and the tone of letters. The model never stores a single document to retrieve later; instead it digests all of it into those billions of numerical parameters, like a mental compression of human written thought. The result is a system that, when you ask it something, doesn't "look it up." It thinks: given everything I've ever read, what is the most plausible, coherent, helpful continuation of this conversation? Most of the time, that produces something genuinely useful. Sometimes it produces something that sounds plausible but is subtly (or embarrassingly) wrong — because the model is navigating by pattern and probability, not by truth-checking. Another helpful analogy: think of an LLM as an extraordinarily well-read person with an unusual memory. They can discuss almost any topic with surprising depth because they've read so much about everything — but they can also misremember, confabulate, and be confidently wrong, just as any person can. The difference is they've "read" far more than any human ever could, and they can write faster than any human ever could.

Historical Development

Origins · 1 minhow this was discovered
History
1950
Alan Turing publishes "Computing Machinery and Intelligence," proposing the idea that a machine might convincingly imitate human language — the philosophical origin of language modeling as an AI goal.
1980
s–1990s: Statistical language models emerge in computational linguistics and speech recognition, using simple word-count methods to predict likely next words in a sequence.
2003
Yoshua Bengio and colleagues publish "A Neural Probabilistic Language Model," introducing the idea of using neural networks to learn word embeddings — transforming words into dense numerical vectors of meaning.
2013
Tomas Mikolov at Google introduces Word2Vec, showing that word embeddings can capture semantic relationships (famously: "king − man + woman ≈ queen"), sparking wide interest in neural representations of language.
2017
Vaswani et al. at Google publish Attention Is All You Need, introducing the Transformer architecture — the foundation of every major LLM since. The key breakthrough is the self-attention mechanism, which allows models to be trained far more efficiently at scale.
2018–2019
OpenAI releases GPT and GPT-2, and Google releases BERT — early large Transformer-based language models demonstrating that pretraining on massive text corpora and then fine-tuning produces strikingly capable systems. GPT-2's release was controversially delayed due to fears about misuse.
2020
OpenAI releases GPT-3 with 175 billion parameters, demonstrating for the first time that a model large enough could perform many tasks it had never been explicitly trained on — so-called few-shot and zero-shot learning. The AI community is stunned.
2022
OpenAI releases ChatGPT, combining GPT-3.5 with instruction tuning and Reinforcement Learning from Human Feedback (RLHF), making LLMs accessible to hundreds of millions of non-technical users and triggering a global conversation about AI.
2023–2024
A proliferation of powerful LLMs — including GPT-4, Google's Gemini, Meta's LLaMA series, Anthropic's Claude, and Mistral — drives rapid advances in reasoning, multimodality (combining text with images), and model efficiency, with open-source models closing the gap on proprietary ones.

Why It Matters

Real-World Impact
ChatGPT (OpenAI)The most widely used LLM application in history, reaching 100 million users faster than any product ever, demonstrating that LLMs can serve as general-purpose assistants for writing, coding, brainstorming, and learning.
GitHub CopilotPowered by OpenAI's Codex model (a GPT variant fine-tuned on code), Copilot autocompletes entire functions and files for software developers in real time, reportedly doubling some programmers' productivity in controlled studies.
Google Search and GeminiGoogle integrated LLM-generated summaries ("AI Overviews") directly into search results, using its Gemini family of models, fundamentally changing how billions of people find information online.
Medical and Scientific ResearchLLMs like Med-PaLM 2 (Google) have been shown to achieve expert-level performance on medical licensing exams, and models like AlphaFold's text companion tools help researchers interpret complex biological literature.
Legal and Document ReviewLaw firms and legal tech companies deploy LLMs to read, summarize, and cross-reference thousands of pages of contracts and case law in minutes — a task that previously required teams of junior lawyers working for weeks.
Language Translation and AccessibilityLLMs have dramatically improved automated translation quality, and tools like Be My Eyes (using GPT-4's vision capabilities) now help visually impaired users navigate the world by describing images and documents in natural language.
Education and TutoringPlatforms like Khan Academy's Khanmigo use LLMs to provide personalized, Socratic tutoring at scale, adapting explanations to each student's level and guiding them through problems rather than simply giving answers.

Prerequisites

What This Leads To

See Also

Transformer Architecture · Attention Mechanism · Prompt Engineering · RLHF (Reinforcement Learning from Human Feedback) · Emergent Abilities in Large Models

Before this

Where this leads