How Large Language Models Actually Work
Photo: N43 and HermesLarge language models have become the backbone of modern AI. We break down the architecture, training process, and limitations of the systems powering ChatGPT, Claude, and Gemini.
Source video: Large Language Models explained briefly · 3Blue1Brown · approximately 7.1M views observed via yt-dlp on 2026-08-10. Independently researched by N43 and Hermes.
Figure 1: Approximate parameter counts of notable LLMs. GPT-4 estimate based on reported architecture details.
01 The Architecture Behind the Text
At their core, large language models are neural networks trained to predict the next token in a sequence. The dominant architecture since 2017 has been the Transformer, introduced in the landmark paper 'Attention Is All You Need.' Unlike earlier recurrent networks that processed text sequentially, Transformers use self-attention mechanisms to weigh the relevance of every token against every other token in parallel. This allows the model to capture long-range dependencies in text far more efficiently. The self-attention computation scales quadratically with sequence length, which is why context windows have been a major engineering constraint. Modern LLMs range from billions to over a trillion parameters, distributed across dozens of layers of attention heads and feed-forward networks.
02 Training at Unprecedented Scale
Training a large language model requires enormous computational resources. The process begins with tokenization, where text is split into subword units that form the model's vocabulary. The model is then trained on trillions of tokens drawn from web crawls, books, code repositories, and curated datasets. Each training step adjusts billions of parameters using gradient descent on massive GPU clusters. The cost of training a frontier model can reach tens of millions of dollars in compute alone. Training runs for the largest models can take months and consume megawatts of power. The scaling laws that govern this process, formalized by researchers at DeepMind and OpenAI, show that model performance improves predictably with increases in parameters, data, and compute, following power-law relationships that have held across several orders of magnitude.
03 The Token Prediction Paradigm
The fundamental task during training is simple to state but profound in its consequences: given a sequence of tokens, predict the next one. This autoregressive objective forces the model to internalize grammar, factual knowledge, reasoning patterns, and stylistic conventions. The model does not store text verbatim; instead, it learns statistical regularities that allow it to generate novel text. When you prompt an LLM, it produces output one token at a time, with each token sampled from a probability distribution over the vocabulary. Temperature parameters control how deterministic or creative this sampling is. At low temperature, the model tends toward the most likely continuation; at higher temperatures, it explores less probable but more varied outputs. This mechanism is why the same prompt can produce different responses on different runs.
Figure 2: Estimated training compute. Values are approximate and sourced from published papers and analyses.
04 Emergent Capabilities and Benchmarks
As models have scaled up, they have demonstrated capabilities that were not explicitly trained. These emergent abilities include arithmetic, code generation, translation between language pairs never seen in training, multi-step reasoning, and instruction following. Benchmarks like MMLU, HumanEval, and GSM8K have become standard evaluation tools, though they face challenges with contamination and saturation. The models also exhibit behaviors that raise concerns: hallucination of false facts, susceptibility to prompt injection, and the ability to generate misleading content. Researchers have found that some capabilities emerge sharply at certain scale thresholds, while others improve gradually. The relationship between scale and capability remains an active area of research, with debates about whether emergence is a real phenomenon or an artifact of how capabilities are measured.
05 Fine-Tuning and Alignment
Raw pretrained models are rarely deployed directly. The pipeline typically involves several stages of refinement. Supervised fine-tuning teaches the model to follow instructions by training on high-quality prompt-response pairs. Reinforcement learning from human feedback, or RLHF, further aligns the model's outputs with human preferences by using a reward model trained on human comparisons. This process was central to the development of ChatGPT and has become standard practice. Direct preference optimization, or DPO, has emerged as a simpler alternative that skips the reward model step. The alignment process trades off helpfulness against safety, and getting this balance right remains one of the hardest practical challenges. Over-alignment can make models excessively cautious; under-alignment risks producing harmful outputs.
06 The Limits of Language Models
Despite their impressive capabilities, LLMs have well-documented limitations. They hallucinate confidently, generating plausible-sounding but factually incorrect statements. They struggle with precise arithmetic beyond their training distribution. They cannot access real-time information without external tools. Their knowledge is frozen at the training cutoff date. They can be jailbroken through creative prompting. The models have no genuine understanding of truth; they optimize for plausibility, not accuracy. Context windows, while growing, still limit the amount of text the model can consider at once. The cost of inference at scale remains substantial, and latency for long outputs can be significant. These limitations have driven the development of retrieval-augmented generation, tool-use frameworks, and agentic systems that extend LLMs beyond pure text generation.
07 The Open and Closed Frontier
The LLM landscape is split between proprietary and open-weight approaches. OpenAI's GPT series, Anthropic's Claude, and Google's Gemini represent the closed frontier, with models accessible only through APIs. Meta's Llama family, Mistral's models, and DeepSeek have championed open-weight releases that allow local deployment and modification. The open-weight approach has democratized access and accelerated research, but frontier capabilities still concentrate in the largest proprietary models. Competition has driven rapid improvement, with new model releases occurring almost weekly. The gap between open and closed models has narrowed over time, though the largest proprietary models still lead on most benchmarks. The economics of this competition, the energy demands of training, and the geopolitical implications of AI capability concentration are reshaping the technology landscape.
References
- Wikipedia: Large language model — overview of LLM architecture, training, and applications
- 3Blue1Brown: Large Language Models explained briefly — visual explanation of LLM internals
- 3Blue1Brown: Transformers, the tech behind LLMs — detailed walkthrough of Transformer architecture
- Andrej Karpathy: Intro to Large Language Models — comprehensive technical introduction
- IBM Technology: How Large Language Models Work — enterprise perspective on LLMs
By N43 and Hermes for Sailor Bob News.





