Module 1 · From characters to vectors

What a language model actually is

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 1 of 9 in this chapter

This chapter’s goalTrace a piece of text from characters to token ids to vectors and back to a score for every possible next token, predict where a tokenizer will split unfamiliar input, and count the parameters of a model from four numbers on its config page.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

One function, called repeatedly

Strip away the chat window, the name, the personality and the tools, and a language model is a single mathematical function. It takes a sequence of integers. It returns a list of numbers, one per entry in its vocabulary, saying how likely each entry is to come next. That is the whole thing.

Written out, the shape is this:

Python
logits = model(token_ids)   # in: 1,842 integers.  out: 128,256 numbers

Nothing else goes in. There is no separate database being consulted, no lookup of who you are, no second system deciding whether the answer is true. Every capability the model appears to have (translation, summarising, writing code, refusing a request) has to be expressed through that one output.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the AI, Actually Explained exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘What a language model actually is’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/what-a-language-model-is (Accessed: 29 November 2026).