What is a Large Language Model?

A Large Language Model (LLM) is a type of AI system trained on massive amounts of text data to understand and generate human language. Think of it as a very sophisticated autocomplete — but one that can write essays, answer questions, summarize documents, write code, and hold conversations.

Examples you’ve probably already used:

  • ChatGPT (OpenAI)
  • Claude (Anthropic)
  • Gemini (Google)
  • LLaMA (Meta)

These are all LLMs — each with different architectures, training data, and capabilities, but all built on the same core idea.


The “Large” in Large Language Model

The word large refers to two things:

  1. Parameters — The internal numerical values the model learns during training. Modern LLMs have billions to trillions of parameters. GPT-4, for example, is estimated to have over 1 trillion parameters.

  2. Training data — LLMs are trained on enormous datasets — books, websites, code repositories, academic papers, and more. We’re talking hundreds of billions of words.

More parameters + more data generally = better understanding of language. But it also means more compute, more memory, and more cost.


How Does an LLM Actually Work?

At its core, an LLM is predicting the next token (roughly a word or word-piece) given everything that came before it.

Here’s the basic loop:

Input: "The capital of France is"
Model predicts: "Paris" (with high probability)

This is called autoregressive generation — the model generates one token at a time, feeding its own output back as input.

But there’s a lot happening under the hood:

1. Tokenization

Text is broken into tokens — chunks of characters that the model understands. The word “unbelievable” might become ["un", "believ", "able"]. This is how models handle any word, even ones they haven’t seen before.

2. Embeddings

Each token is converted into a vector — a list of numbers that represents its meaning in a high-dimensional space. Similar words end up close together in this space.

3. Transformer Architecture

The secret sauce. The Transformer (introduced in Google’s 2017 paper “Attention Is All You Need”) uses a mechanism called self-attention to weigh how relevant each word is to every other word in the input.

This is what lets LLMs understand context — “bank” means something different in “river bank” vs “savings bank”, and the Transformer figures that out.

4. Layers & Depth

Transformers are stacked in layers. Each layer refines the model’s understanding. The deeper the model, the more abstract and nuanced its representations become.


Training vs Inference

There are two distinct phases:

PhaseWhat Happens
TrainingThe model learns from data by adjusting parameters to minimize prediction errors. Extremely expensive — can cost millions in compute.
InferenceThe trained model generates responses. Much cheaper, but still resource-intensive at scale.

When you use ChatGPT or Claude, you’re always in inference mode — the model itself isn’t learning from your conversation (unless there’s explicit fine-tuning happening separately).


Why Do LLMs Feel So Smart?

LLMs don’t “understand” language the way humans do — they don’t have beliefs, experiences, or consciousness. What they have is an incredibly detailed statistical map of human language.

By processing billions of examples of how humans write and think, they learn patterns so rich that they can:

  • Reason through problems step by step
  • Write in different styles and tones
  • Translate between languages
  • Generate and debug code
  • Summarize and extract information

It’s pattern matching at a scale and depth that produces genuinely useful, often impressive results.


Key Terms Cheat Sheet

TermMeaning
TokenThe smallest unit of text the model processes
ParameterA learnable value inside the model
EmbeddingA numerical vector representing a token’s meaning
TransformerThe architecture most modern LLMs are built on
Self-AttentionMechanism that weighs token relationships in context
InferenceRunning a trained model to generate output
TrainingThe process of teaching the model on data

What’s Next in This Series?

Now that you know what an LLM is, in Part 2 we’ll go deeper into the Transformer architecture — how attention works, what makes it so powerful, and why it replaced older approaches like RNNs.

Stay tuned — this series goes from zero to building intuition about modern AI systems.