Module 1 · From characters to vectors

Working in embedding space, with free tools

In this lesson

  • 10 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 6 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

Build the thing, then argue about it

You have the idea from the previous lesson: meaning is a direction. This lesson is the practical half, because the limits of embeddings only become obvious when you have watched them fail on your own data.

Everything here runs offline on a laptop with no GPU. sentence-transformers is free and open source, the small models are a few hundred megabytes, and a corpus of a thousand documents embeds in under a minute on a CPU.

Bash
pip install sentence-transformers numpy

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) ‘Working in embedding space, with free tools’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/embedding-space-in-practice (Accessed: 29 November 2026).