What the heck is LLM
Chapter 1 — Understanding LLMs

Chapter 1 — Understanding LLMs

A high-level, beginner-friendly tour of what large language models are, how transformers work, and the journey of building one.

This chapter is the map for everything that follows. Before you write a single line of PyTorch, it makes sure you understand the what, the why, and the how of large language models. The original ideas are preserved — only the academic phrasing has been trimmed, so nothing important gets lost in jargon.

What you'll learn

By the end of this chapter you'll be able to answer, in plain language:

  • What an LLM actually is (and what "large" really means).
  • Where LLMs are used today, from chatbots to code assistants.
  • The two big stages every LLM goes through: pretraining and finetuning.
  • What a transformer is, and why almost every modern LLM uses one.
  • How huge amounts of text data let these models generalise so well.
  • Why GPT is a "decoder-only" model, and how that differs from BERT.
  • The three-stage roadmap we'll follow to build an LLM from scratch.

Chapter contents

A quick note on tone: when we say an LLM "understands" language, we mean it produces text that looks coherent — not that it thinks or feels anything. Keep that caveat in mind throughout.

On this page