Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
How LLMs Work: From N-grams to Modern Architectures
1 students

How LLMs Work: From N-grams to Modern Architectures

No math or coding needed. Understand ChatGPT by following what each model solved, from N-grams to Gated DeltaNet
Created by神草 経知
Last updated 9/2026
English

What you'll learn

  • Explain in your own words that a language model is a machine that outputs the probability of the next word, and that text generation is just repeating that game
  • Trace N-grams, RNNs, LSTMs, Attention, Transformers, Mamba, and Gated DeltaNet by explaining which problem each new technique solved.
  • Compute N-gram probabilities and Self-Attention (dot product, softmax, weighted average) by hand with small numbers
  • Explain the meaning of terms such as embedding, gate, KV cache, state space model, MoE, and attention sink by tying each to an analogy
  • Compare the strengths and weaknesses of Transformer and Mamba (precise search versus cheap long-term summarization) and explain why hybrid architectures emerged
  • Read and interpret the idea behind the hybrid architecture of Qwen3-Next / 3.5 / 3.8, which combines three Gated DeltaNet layers with one Gated Attention layer

Course content

8 sections • 9 lectures • 1h 30m total length
  • The Next-Word Guessing Game: Course Map and 3 Promises7:22

    What word comes after "It is so hot today, I want something cold like"? Beer, iced tea, ice cream, or math? Computing this "how likely" as a probability is the job of a language model. Writing text is nothing more than repeating this game one word (token) at a time. In this lecture, after nailing down this single most important sentence of the course, we use a timeline to see the big picture: the only thing that changed over 100 years is how context is remembered. We also introduce the map of all 8 sections, the analogy of how a reader remembers a book, and three promises: keep math to a minimum, one idea per slide, and always say why.

Requirements

  • No prior knowledge of math or programming is required. Addition, multiplication, and a feel for proportions are enough to follow to the end
  • Having used a conversational AI such as ChatGPT at least once will make the course examples easier to picture
  • If you want to try the hands-on exercises introduced in the course, a browser environment that can open Google Colab is handy (not required)

Description

What happens inside ChatGPT, told through 100 years of history

What exactly is a large language model (LLM) like ChatGPT doing inside? This course aims to let you explain the basic principles in your own words, even if you have no background in programming or math.

The approach is a little unusual. Instead of jumping straight to the latest models, we walk through roughly 100 years of language model history in order, from Markov chains in 1913 to the hybrid architectures of 2026. Every technique was born to solve a problem the previous technique had. When you follow each problem together with its solution, even intimidating cutting-edge techniques fall into place naturally.

Figures, analogies, and a minimum of math

Throughout the course we use a single analogy: "how a reader remembers a book." Looking only at the last few words, summarizing into a single memo, looking back at sticky notes, running a full-text search every time, and returning to a smart summary memo. We understand each model as a different way of remembering.

Math is kept to a minimum, and whenever it is truly necessary we always explain in the order figure, analogy, then equation. The course is built so that the story still holds together if you skip the equations. The only arithmetic you need is addition, multiplication, and a feel for proportions. For Self-Attention, we trace a single hand calculation with small numbers so the mechanism sinks in. Each section ends with a 3-line summary and a quiz, and once you can answer it you are ready to move on.

What you will learn

The starting point: a language model is a "next-word guessing game"

N-grams: the era of counting to predict, and its two limits

Embeddings, RNNs, and LSTM gates: turning words into numbers and remembering as you read

seq2seq and Attention: the idea of looking back at sticky notes with a weighted average

Transformer: query, key, value, Self-Attention, positional encoding, multi-head, FFN, and the weakness called the KV cache

Linear Attention, S4, Mamba: handling long context with a fixed-size state

Gated DeltaNet and Gated Attention: the hybrid of three summary-memo layers and one full-text-search layer, attention sinks, MoE, and a reading of Qwen3-Next / 3.5 / 3.8

By the end of the course, terms like Attention, KV cache, state space model, and MoE that show up in news and paper titles will no longer be intimidating, and when a new model appears you will be able to read it with the question "what did this solve compared to the one before?" The recommended pace is one section per day.

Who this course is for:

  • People who use AI tools such as ChatGPT but do not know what is happening inside
  • People who feel uneasy about terms like Attention, Transformer, and KV cache that appear in LLM articles and news
  • Beginners who want to understand the basic principles of AI systematically without a math or programming background
  • People who want to be able to read the specs and paper titles of the latest models in the context of how the technology evolved