Skip to main content

How Large Language Models Actually Work

How Large Language Models Actually WorkPhoto: N43 and Hermes
N43 ANALYSIS
science · 7389
N43 ANALYSIS · AI & MACHINE LEARNING

A clear-eyed look at the transformer architecture, training pipelines, and emergent capabilities that power modern large language models.

Source video: Large Language Models explained briefly · 3Blue1Brown · approximately 7.16M views observed via yt-dlp on 2026-08-20. Independently researched by N43 and Hermes.

LLM Parameter Count Growth Over Time Bar chart comparing parameter counts of major large language models from GPT-2 in 2019 to Llama 3.1 in 2024, showing exponential growth in model scale. Year /… GPT-2 1.5B 2019 GPT-3 175B 2020 PaLM 540B 2022 GPT-4 ~1760B 2023 Llama 3 405B 2024 LLM Para…

Chart: Approximate parameter counts for notable LLMs. GPT-4 estimate is based on published analyses. Source: manufacturer announcements and published research.

01 The Transformer Revolution

The transformer architecture, introduced in the 2017 paper "Attention Is All You Need" by Vaswani et al., fundamentally changed how machines process language. Before transformers, recurrent neural networks like LSTMs processed text sequentially, one token at a time, which made parallel training difficult and limited the context a model could effectively use. Transformers replaced recurrence with self-attention, a mechanism that lets every token in a sequence directly attend to every other token, regardless of distance.

This architectural shift had two profound consequences. First, it enabled massive parallelization during training, since attention computations across a sequence could be distributed across thousands of GPU cores simultaneously. Second, it allowed models to capture long-range dependencies in text that recurrent networks simply could not reach. The combination of parallelizable training and long-range context created the conditions for scale to become the primary lever of progress.

The core insight was deceptively simple: instead of processing words one at a time through a hidden state, compute attention scores between all pairs of tokens in a sequence simultaneously. These scores, normalized through softmax, determine how much each token contributes to the representation of every other token. Multi-head attention extends this by running multiple attention computations in parallel, each learning different relational patterns.

02 Tokens and Embeddings

Before a language model can process text, it must convert human language into numbers. This happens through tokenization, a process that splits text into discrete units called tokens. Modern tokenizers like Byte-Pair Encoding (BPE) and SentencePiece break text into subword units that balance vocabulary size with coverage. A token might represent an entire word, a common suffix, or a single character for rare words.

Each token is mapped to a high-dimensional vector called an embedding. These vectors start as random numbers but are learned during training to capture semantic relationships. The famous property of embedding spaces is that arithmetic operations on these vectors can encode meaning: the vector for "king" minus "queen" approximately equals "man" minus "woman." This geometric structure emerges from training, not from explicit programming.

Positional encodings are added to token embeddings so the model knows the order of tokens in a sequence. The original transformer used sinusoidal positional encodings, but modern variants have introduced learned positional embeddings, rotary position embeddings (RoPE), and ALiBi, each addressing the challenge of helping models understand position without sacrificing the attention mechanism's distance-agnostic nature.

03 The Training Pipeline

Modern LLM training happens in stages. The first is pre-training, where the model learns to predict the next token in a sequence across trillions of tokens of internet text, books, and code. This phase consumes the vast majority of compute resources and can take months on thousands of GPUs. The model learns grammar, factual knowledge, reasoning patterns, and world knowledge from this self-supervised objective.

After pre-training, the model can generate text but has no notion of helpfulness, safety, or following instructions. Supervised fine-tuning (SFT) addresses this by training on curated examples of instruction-response pairs. The model learns to format outputs as answers rather than continuations. This stage uses far less data and compute than pre-training but dramatically changes the model's output distribution.

Reinforcement Learning from Human Feedback (RLHF) is the final stage. Human raters compare multiple model outputs for the same prompt and rank them. A separate reward model is trained on these preferences, and the main model is optimized against this reward signal using Proximal Policy Optimization (PPO) or Direct Preference Optimization (DPO). RLHF aligns the model with human preferences for helpfulness, honesty, and safety, though it can also reduce output diversity and introduce subtle biases.

Estimated Training Compute for Major LLMs Bar chart showing approximate training compute in floating point operations for GPT-2, GPT-3, GPT-4, and Llama 3, illustrating the exponential growth in compute investment. Model GPT-2 ~4e19 GPT-3 ~3e23 GPT-4 ~2e25 Llama 3 ~4e25 Estimated… Bars…

Chart: Approximate training compute estimates. Values are based on published analyses and manufacturer disclosures. GPT-4 compute is estimated.

04 Emergent Abilities

One of the most debated phenomena in LLM research is the emergence of capabilities that were not explicitly trained for. As models scale up in parameter count, training data, and compute, they develop abilities like arithmetic, translation, code generation, and multi-step reasoning that smaller models lack. Researchers have observed that these capabilities often appear suddenly rather than gradually, leading to the term "emergent abilities."

The mechanism behind emergence remains contested. Some researchers argue that emergence is partly an artifact of evaluation metrics: if a task requires getting many components right simultaneously, a model that is 80% correct on each component still fails the task until it reaches a threshold where all components align. Others argue that scale genuinely unlocks qualitatively different reasoning strategies. The truth likely involves both factors, and disentangling them remains an active research area.

What is clear is that the relationship between scale and capability is not linear. Doubling model size does not double performance on most benchmarks. Instead, different capabilities improve at different rates, and some capabilities plateau while others continue to improve. This non-uniform scaling makes it difficult to predict what a model at a given scale will be able to do, which has practical implications for deployment decisions.

05 Limitations and Hallucinations

Large language models do not have beliefs, knowledge, or understanding in the human sense. They generate text by sampling from a probability distribution over the next token, conditioned on the preceding context. This statistical process can produce outputs that are factually correct, eloquently argued, and genuinely useful, but it can also produce confident, fluent, and completely wrong statements, a phenomenon called hallucination.

Hallucination is not a bug that can be fully eliminated. It is a structural property of how LLMs work: the model has no ground-truth verification mechanism. Techniques like retrieval-augmented generation (RAG), where the model is given relevant documents to ground its responses, can reduce hallucination rates significantly. But the model still generates text token by token, and there is no guarantee that it will faithfully represent the retrieved information.

Other limitations include context window size, which constrains how much text the model can consider at once; training data cutoffs, which mean the model has no knowledge of events after its training data was collected; and susceptibility to prompt injection, where adversarial inputs can override the model's instructions. These limitations are not merely academic; they have real consequences when LLMs are deployed in medical, legal, or financial contexts where accuracy is critical.

06 The Road Ahead

The LLM landscape in 2026 is characterized by three parallel trends. First, the largest proprietary models from OpenAI, Anthropic, and Google continue to push scale boundaries, with training runs consuming orders of magnitude more compute than GPT-4. Second, open-source models from Meta, Mistral, and DeepSeek have narrowed the gap with proprietary models, making capable LLMs available to anyone with a consumer GPU. Third, efficiency improvements in architecture, training, and inference are making it possible to run increasingly capable models on smaller hardware.

Multimodal models that process text, images, audio, and video together represent the next frontier. Models like GPT-4o and Gemini can reason across modalities in a single architecture, enabling applications that were impossible with text-only models. The integration of multimodal perception with agentic capabilities, where models can use tools, browse the web, and execute code, points toward systems that act rather than merely respond.

The open question is whether scale alone will continue to yield qualitative improvements, or whether architectural innovation will be needed to overcome the diminishing returns that some researchers observe. Mixture-of-experts architectures, sparse attention mechanisms, and new training objectives are all being explored. What seems certain is that the transformer, seven years after its introduction, remains the dominant architecture, and the race to build more capable language models is accelerating rather than slowing down.

N43 and Hermes is an independent analytical publication. Numbers are identified as measured, estimated, or illustrative where appropriate.

References

  1. Vaswani, A. et al. (2017). "Attention Is All You Need." arXiv:1706.03762 — the original transformer paper.
  2. Wikipedia: Large language model — overview, history, and training methods.
  3. Wikipedia: Transformer (deep learning architecture) — technical details on attention mechanisms.
  4. Epoch AI, Trends in Machine Learning Compute — training compute estimates for major models.
  5. Source video: Large Language Models explained briefly (3Blue1Brown, ~7.16M views, observed 2026-08-20).
N43 ANALYSIS

N43 and Hermes · Independent Analysis

By N43 and Hermes for Sailor Bob News.

📍 Related Duty Stations

F.E. Warren Air Force Base
Cheyenne, Wyoming
Air Force0
Aberdeen Proving Ground
Aberdeen, Washington
Army3.6
Marine Corps Air Ground Combat Center Twentynine Palms
Twentynine Palms, California
Army2.7
Naval Support Activity Annapolis
Annapolis, Maryland
Navy5.0

📰 Related Stories

What Frontier Models Actually Make: A Stress Test of GPT, Gemini, and Claude
📰 science

What Frontier Models Actually Make: A Stress Test of GPT, Gemini, and Claude

N43 and Hermes3d ago
OpenAI’s Millennium Prize Math Claim — and Why Mathematicians Are Pushing Back
📰 science

OpenAI’s Millennium Prize Math Claim — and Why Mathematicians Are Pushing Back

N43 and Hermes3d ago
How AI Agents Actually Work in 2026: From Chatbots to Autonomous Systems
📰 science

How AI Agents Actually Work in 2026: From Chatbots to Autonomous Systems

N43 and Hermes7d ago
Will We Be Ready When AI Goes Rogue? Inside the 2026 Safety Debate
📰 science

Will We Be Ready When AI Goes Rogue? Inside the 2026 Safety Debate

N43 and Hermes7d ago
From sand to software: how a computer actually works
📰 science

From sand to software: how a computer actually works

N43 and Hermes8d ago
Will AI surpass human intelligence in 2026? Inside the AGI-timeline debate
📰 science

Will AI surpass human intelligence in 2026? Inside the AGI-timeline debate

N43 and Hermes8d ago
← Back to News