There are words we encounter multiple times a day. AI, Machine Learning (ML), Deep Learning (DL), Large Language Model (LLM), GPT (Generative Pre-trained Transformer), Model, Parameter, Fine-tuning, Reinforcement Learning from Human Feedback, Foundation Model, Sovereign AI… They flood the news, lectures, and office conversations, swirling around us constantly.
Of all these terms, the four you truly need to understand are AI, Machine Learning, Deep Learning, and LLM — and that’s almost the whole story. But honestly, how many people could explain exactly how those four differ?
I couldn’t at first either. I used to wave it off with something like, “AI came first, then ML, then DL, and eventually LLM.” But to really understand and use today’s AI, you need to know how these foundational concepts relate to each other and what problem each one was built to solve.
In this post, we’ll work through all four — no equations, no code — tracing how each stage emerged by breaking through the limits of the one before it.
Layer One: AI — Bringing Intelligence to Machines
Summer of 1956. Dartmouth College, New Hampshire, USA.
Mathematicians, psychologists, and computer scientists gathered to seriously debate what then seemed like a preposterous question: “Can machines think?”
At that meeting, mathematician John McCarthy coined the term “Artificial Intelligence.” Seventy years later, we’ve come remarkably close to answering that question — yet precisely defining AI remains surprisingly tricky.
The simplest definition goes like this:
AI (Artificial Intelligence): The academic field and set of technologies aimed at implementing human-like intelligent behaviors — problem-solving, reasoning, language understanding, pattern recognition — in computers.
The key insight is that AI is not a single technology — it’s more like an umbrella concept. Machine Learning is AI. Deep Learning is AI. LLMs are AI. Pathfinding algorithms and email spam filters are AI too.
The diagram below shows how AI, Machine Learning, Deep Learning, and LLM are nested inside one another — like rooms within a house, each contained within the one before it.
Keep this diagram in mind. Every concept we’ll discuss lives inside that house called AI.
Layer Two: Machine Learning — Data Becomes the Teacher
In the early days of AI, the dominant approach was straightforward: encode human knowledge and rules directly into the computer.
Say you want to build a spam filter. With a rule-based approach, it looks like this:
“If the subject line contains ‘free,’ ‘winner,’ or ‘click here,’ it’s spam. If the sender domain is an unknown .xyz, it’s spam. If the body has more than five links…”
You write your first hundred rules, and spammers immediately find new phrasings to slip through. You write a hundred more, and they adapt again. The game never ends.
Machine Learning takes a completely different approach.
Instead of writing rules by hand, you show the system millions of examples of spam and legitimate email — and let the AI find the patterns on its own.
Think of it like the difference between two chefs. One has the recipe memorized cold and follows it to the letter; the other has cooked hundreds of times and has developed an intuitive feel for ingredients and heat. The first chef struggles whenever the recipe doesn’t cover the situation. The second can make something out of whatever’s in the fridge.
In Machine Learning, “learning” means exactly what that second chef does — discovering rules from experience (data) rather than being handed them.
Three Ways Machine Learning Can Learn
Within Machine Learning, the approach varies significantly depending on how the system learns.
Reinforcement Learning operates on a “action → reward” loop. Google DeepMind’s AlphaGo played millions of games, discovering optimal strategies entirely on its own — not because anyone taught it “play here in this situation,” but because winning earned rewards and losing brought penalties.
Where Layer Two Hit Its Wall: Machine Learning’s Limits
Machine Learning had broken through the limits of rule-based systems, but one fundamental problem remained.
Say you want an AI that can recognize photos of cats. To build one with Machine Learning, a developer first has to answer a hard question:
“What features actually distinguish a cat? Ear shape? Whiskers? Eye shape? Fur texture?”
This process of manually selecting and engineering the features to hand the AI is called Feature Engineering. And it turns out to be extremely difficult.
Cat ears look different across breeds. From certain angles, the whiskers disappear. In low light, you can’t even make out the fur. Deciding which features matter was itself a specialist’s job — and getting it wrong sent model performance straight to the floor.
“What if the machine could learn which features matter, too?” — That question is where Deep Learning begins.
Layer Three: Deep Learning — Machines Learn to Find Features on Their Own
To understand Deep Learning, you first need the concept of an Artificial Neural Network.
The name sounds intimidating, but the core idea is simple: it’s a mathematical imitation of how neurons in the brain connect and pass signals to each other. It’s not a perfect copy of the brain, but it borrows the key idea.
Picture a job interview process. The first round skims your resume and basic competencies. Pass that, and the second round digs deeper into role fit. The final round examines your values and potential. Each stage takes the output of the previous one and asks more abstract questions. An artificial neural network works the same way — when a photo comes in, Layer 1 picks up pixel-level brightness differences (edges), Layer 2 assembles those edges into shapes, and Layer 3 recognizes features like eyes, ears, and nose. Each layer receives the previous layer’s output and finds increasingly abstract patterns. The final verdict — “cat or not cat” — comes at the end.
Why “Deep”?
In Deep Learning, “deep” refers to the number of layers. Just as each round of a multi-stage interview gets at something more fundamental, more layers mean the ability to learn more complex, abstract patterns.
For a cat image:
This is the revolutionary part of Deep Learning. Nobody had to tell it “look at the ear shape.” Show it millions of cat photos, and the AI discovers on its own that ear shape is an important feature.
The ImageNet Competition — Where the AI Revolution Began
To understand the 2012 breakthrough, we first need to understand how the stage was set.
In the mid-2000s, Fei-Fei Li, a professor at Stanford University, had a gut feeling that AI research had a fundamental problem. AI models at the time trained on a few hundred to a few thousand images, while a human child absorbs hundreds of millions of pieces of visual information over years of life. The scale of the data was simply wrong.
Starting in 2007, she mobilized crowdsourced workers worldwide to label images on a massive scale. The resulting ImageNet dataset contained over 14 million images across more than 22,000 category labels — thousands of photos per dog breed alone.
In 2010, the ILSVRC (ImageNet Large Scale Visual Recognition Challenge) began: an annual competition where research teams worldwide competed to correctly classify images across 1,000 categories. Li’s goal wasn’t competition for its own sake — it was to give the entire AI research community a shared benchmark, a common ground to measure progress.
2012: The Moment Everything Changed
In 2012, a team from the University of Toronto — Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton — entered ILSVRC with a Deep Learning model called AlexNet.
The second-place team had an error rate of 26.2%. AlexNet came in at 15.3%. A gap of 10.8 percentage points — this wasn’t beating the competition, it was operating in a completely different dimension.
That single competition changed the direction of AI research permanently. Deep Learning models cut error rates year after year, and by 2015, one achieved an error rate of 3.57% — surpassing human-level recognition (approximately 5%) for the first time.
Three conditions had ripened simultaneously to make this possible:
| Condition | Detail |
|---|---|
| 💾 Large-scale data | ImageNet: over 1 million labeled images |
| ⚡ GPU parallel computing | NVIDIA CUDA accelerated training by orders of magnitude |
| 🔬 Improved algorithms | ReLU activation functions, Dropout to prevent Overfitting |
Where Layer Three Hit Its Wall: Language Was Different
Deep Learning achieved remarkable results in image recognition, audio classification, and game play. But language presented a different kind of wall.
In an image, each pixel is relatively independent. It’s rare for the pixel in the upper left to be semantically entangled with one in the lower right. Language is entirely different.
“I picked it up in the park yesterday.”
To understand what “it” refers to, you need the full context of the surrounding text — possibly from sentences dozens of pages earlier in a novel.
The dominant approach at the time, RNN (Recurrent Neural Network), processed sentences word by word in sequence. The longer the sentence, the more the model forgot what came earlier — like reading a page and finding the previous page has already faded from memory.
“What if we could process the entire sentence at once, capturing the relationship between every word simultaneously?” — That question is where the Transformer begins.
Layer Four: LLM — The Vast Intelligence That Understands Language
Attention: Deciding Where to Look, on Its Own
In 2017, a Google research team published a paper called “Attention is All You Need” (a riff on the Beatles’ “Love is All You Need”) — one of the most influential papers in AI history, now cited over 173,000 times.
The core idea — the Attention mechanism — can be explained like this.
Picture a scene you’ve seen in detective dramas: a wall covered in photos and notes pinned up all over it, with the detective connecting related items with strings. The stronger the connection between two clues, the thicker the string. The crucial point is that these connections are drawn with the entire wall spread out at once — not examined one item at a time in order. Attention works the same way. Every word in the sentence is laid out across the wall, and the model simultaneously draws connections — weighted by relevance — between each word and every other word. The diagram below is that wall.
The key point is that this computation doesn’t process words one at a time — it processes the entire sentence in parallel at once. That made training far faster than earlier approaches and dramatically improved performance on long contexts.
If Attention is the mechanism (the component), then the Transformer is the neural network architecture (the complete design) built around that Attention. The paper title “Attention is All You Need” was a declaration: you can build a language-processing architecture using Attention alone, without the complex sequential structure of RNNs. This Transformer architecture became the blueprint for every modern LLM that followed — GPT, BERT, Claude, and beyond.
Generating One Word at a Time, Looking at Itself
The way an LLM generates a response is surprisingly simple: “look at the text so far and predict the most plausible next word” — repeated endlessly.
Given the input “The weather is sunny today, so I feel,” the LLM calculates probabilities for the next word — “great,” “refreshed,” “lifted” — and picks one. Then it takes “The weather is sunny today, so I feel great” as input and predicts the next word again. This continues until the sentence is complete.
This is called Auto-regressive generation, because the model feeds its own previous output back in as the next input. This is exactly why ChatGPT types out responses character by character — it’s literally generating tokens (the basic units of text) one at a time, in sequence. The pre-training process of predicting “the next word” trillions of times is what teaches the model this generation behavior.
There’s one more interesting piece. LLMs don’t always pick the highest-probability word. They inject a bit of randomness — and that’s what makes each response feel fresh, and what enables creative output. The Temperature value you often see in API settings controls the strength of this randomness.
- Low Temperature (0–0.3): The model almost always picks the most probable word. Responses are consistent and predictable, but repeat the same question and you’ll get nearly the same answer. Best suited for tasks where accuracy and reproducibility matter most — code generation, data extraction, structured summarization.
- High Temperature (0.7–1.2): Lower-probability words get a chance too, producing unexpected combinations. Responses are varied and fresh, but push it too high and the text can lose coherence and drift off course. Best for tasks where variety and creativity matter most — brainstorming, creative writing, marketing copy.
Temperature is ultimately a knob controlling the trade-off between “how predictable do you want the answer” and “how varied do you want the answer.” The general rule: keep it low for well-defined tasks with a correct answer, and high for open-ended creative work.
How LLMs Are Built
Today’s LLMs are built on the Transformer architecture — but how does a model like ChatGPT become capable of such natural conversation? Training happens in three major stages.
① Pre-training: Learning Language Itself
The goal of pre-training is simple: “Given this text, predict what comes next.” Repeated trillions of times. Training data spans web crawls (Common Crawl), Wikipedia, millions of books, academic papers, source code, news archives — essentially every piece of text on the internet. GPT-3 trained on approximately 450 billion tokens.
How does such a simple objective lead to language understanding? The paradox is that predicting well requires knowing almost everything about language. To fill in “The weather is sunny today, so I feel “, the model needs weather vocabulary, emotional expression, and causal sentence structure. To predict the next word in “He said she would “, it needs English subject-verb agreement rules. To complete “Paris is the ___ of France”, it needs world geography. Each prediction generates an error, and that error propagates back to adjust hundreds of billions of parameters — trillions of repetitions, and the model builds up all of this knowledge in the form of parameter values. Nobody told it “this is a grammar rule.” It internalized structure as a side effect of trying to predict better.
One of the most important things that takes shape inside the model during this process is Embedding. Each word (token) is represented as a coordinate vector of hundreds to thousands of numbers — and as training progresses, words with similar meanings cluster near each other in this coordinate space, much like how geographically similar regions are close on a map. “King” and “queen” end up nearby; “hot” and “cold” land in opposite directions. Embeddings don’t stay locked inside the LLM. You can extract this ability to convert text into coordinates and use it externally: transform documents into embedding coordinates, store them, and later find “semantically similar documents” in an instant. Storage systems designed specifically for this kind of coordinate search are called Vector Databases. Products like Pinecone, Weaviate, and Chroma fall into this category — and they’re the core component of RAG (Retrieval-Augmented Generation), the technique that lets LLMs reference up-to-date information or internal company documents when generating answers.
Alongside embeddings, the Attention heads described earlier also specialize during pre-training. The multiple heads, initially randomized, diverge into distinct roles. One head tracks subject-verb agreement; another figures out which noun “it” refers to from an earlier sentence; another connects a premise from dozens of sentences back to the current context. All of this structure — embedding coordinates, specialized Attention heads, language and world knowledge — gets encoded and distributed across hundreds of billions of parameter values. No single fact lives in a single parameter; many parameters collaborate to express each piece of knowledge.
The model that emerges from pre-training is called a Foundation Model. It understands language deeply but can’t hold a conversation — given a question, it generates more text in the same vein rather than answering. It knows language but not conversational norms. This stage also consumes the most resources: training a GPT-4-scale model runs thousands of A100 GPUs for months, at an estimated cost of tens of millions to hundreds of millions of dollars. This is why only a handful of large organizations — OpenAI, Google, Anthropic, Meta — can train their own foundation models.
② Fine-tuning (SFT): Learning How to Hold a Conversation
The foundation model knows language but doesn’t know how to “follow instructions.” Fine-tuning prepares tens of thousands to hundreds of thousands of high-quality conversation pairs — “Question: ~~, Ideal response: ~~” — and trains the foundation model to generate useful responses when a person asks a question. This is called Instruction Tuning or Supervised Fine-Tuning (SFT). The data volume is far smaller than pre-training, but quality is everything. OpenAI converted GPT-3 into InstructGPT using only about 13,000 examples — fundamentally transforming a model that cost hundreds of millions of dollars, with just a small set of high-quality data.
Fine-tuning serves many purposes beyond conversational ability. It’s used to create specialized models for medical, legal, or financial domains; to improve performance in specific languages; to produce models that output only JSON or SQL; and to shape the writing style to match a company’s brand voice — any case where you’re adding a targeted layer on top of the foundation model.
③ RLHF: Learning What Responses People Actually Prefer
Fine-tuning alone can produce a reasonably functional chat model. But “useful” is an ambiguous standard — and you can’t exactly ask the model which of two responses is better. RLHF (Reinforcement Learning from Human Feedback) solves this. Human annotators rank multiple responses to the same question by preference. Those rankings train a Reward Model that outputs a score for “how much would a human like this response?” That score then becomes the reward signal for a reinforcement learning loop using PPO (Proximal Policy Optimization), fine-tuning the main LLM to generate higher-scoring responses more often.
Through this process, the model moves beyond “grammatically correct sentences” toward “responses that people actually find helpful” — what researchers call Alignment. ChatGPT refusing harmful requests and admitting uncertainty are both products of RLHF. Anthropic (the company behind Claude) extends this with CAI (Constitutional AI): instead of relying on human annotators, a predefined set of principles (the “constitution”) guides the AI to critique and revise its own responses, maintaining consistent safety standards while reducing the need for human involvement.
Parameters: The Unit of Model Scale
LLM news constantly mentions “175 billion parameters” or “1 trillion parameters.” So what exactly is a parameter?
What Parameters Are: Numbers That Determine Signal Strength
A neural network is a web of connected neurons. When one neuron’s output is passed to the next, the number that controls the signal’s strength is a Weight; the baseline offset for each neuron is a Bias. Together, these are parameters — like the ratios in a recipe: “2 cups flour, 1 cup sugar, 0.5 cups butter.” At the start of training, all these values are initialized randomly. When the model attempts to predict the next word and makes an error, that error propagates backward to adjust the offending parameters slightly — this is called Backpropagation. Repeat this process trillions of times while simultaneously adjusting hundreds of billions of parameters, and the model gradually takes shape. Training GPT-3 required thousands of GPUs running for weeks, at an estimated cost of several million dollars.
Parameter Count = Memory Capacity and Expressive Power
There’s a common misconception worth addressing: parameter count doesn’t grow as training continues. When a model is designed, the number of layers and their width are fixed, which locks in the parameter count. Training adjusts the values of those parameters — a 175-billion-parameter model still has exactly 175 billion parameters after training, just as before. More parameters means more capacity — a larger space of patterns the model can express. A small-parameter model can only capture coarse grammatical patterns; a large one can pick up on subtleties like “this context calls for irony” or “this reads like a medical paper.” A useful analogy is musical staff lines: five lines can carry a simple melody, but hundreds of lines could hold a full orchestral score. Subtle contextual nuances, cultural connotations, domain-specific knowledge — all of it gets encoded in these numbers. For reference, the human brain has roughly 100 trillion synapses; even the largest current LLMs operate at a fraction of that scale.
Real Model Size Comparison
| Model | Parameters | Notes |
|---|---|---|
| GPT-2 (2019) | 1.5B | Deemed “too dangerous to release” at the time; now considered small |
| GPT-3 (2020) | 175B | First scale where emergent abilities were observed |
| LLaMA 2 70B (2023) | 70B | Open-source; runnable on high-end GPU servers |
| GPT-4 (2023) | ~1.8T (estimated) | Not disclosed; believed to use Mixture of Experts (MoE) |
| Claude 3 Opus (2024) | Undisclosed | Top-tier in complex reasoning |
“Bigger parameters always means better” doesn’t hold up. Data quality, training methodology, and fine-tuning approach can all enable a much smaller model to outperform a larger one in a specific domain.
Parameters, Memory, and Cost
Each parameter takes 2 bytes in float16. By that measure, a 7B model needs roughly 14GB of VRAM, a 70B model needs ~140GB, and a 175B (GPT-3-scale) model needs ~350GB. In practice, Quantization is the standard workaround: compressing parameters to 4–8 bits cuts memory requirements in half to a quarter, with a small accuracy trade-off. This is what lets you run capable models on a local PC — it’s how Ollama and llama.cpp work.
Bigger Isn’t Always Better — The Trade-offs
More parameters mean slower inference and proportionally higher GPU costs. If parameters far exceed what the training data can fill, the model memorizes rather than generalizes — a phenomenon called Overfitting — and struggles with novel inputs. These trade-offs have shifted recent research away from “make it bigger” toward “how efficiently can we train a given parameter count?” DeepMind’s Chinchilla paper (2022) established the principle that doubling model size should be matched by doubling training data for optimal efficiency — and it fundamentally changed how the industry trains models.
Closing: Four Layers, One House
Let’s bring together everything we’ve covered.
- AI — The umbrella concept for implementing intelligent behavior in machines. Spans everything from rule-based systems to the latest LLMs.
- Machine Learning — The shift from handwritten rules to patterns discovered autonomously from data.
- Deep Learning — Taking that further: the machine learns which features to extract, too. Exploded in 2012 with AlexNet.
- LLM — Massive models trained on “language” via the Transformer architecture. Transformed the paradigm for understanding and generating text.
Each layer emerged by breaking through the limits of the one before it — not replacing what came before, but containing it.
Does the way these four concepts connect feel clearer now? If you can remember how each room in the house of AI emerged to solve a specific problem, you’ll be able to place any AI story you encounter — “ah, this is about Deep Learning,” “this is an LLM story” — without losing your footing.
References
- History of Artificial Intelligence — Britannica
- AlexNet — Wikipedia
- How AlexNet Transformed AI — IEEE Spectrum
- Transformer (deep learning) — Wikipedia
- What Are Large Language Models — IBM
- LLM Parameters: A Simple Explanation — Towards AI
- Supervised vs Unsupervised vs Reinforcement Learning — GeeksforGeeks