Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · AI · Past the basics · about 20 min to read

Play it as a journeyTutor comes with a plan

Looking Inside the Model

Tokens and Embeddings
Tokens and Embeddings · Open board

The Tokens and Embeddings board ends on a map where directions mean things. This lesson hunts for such arrows deep inside a trained model, where nobody drew or labelled them.

Before you start. What a Neural Network Is showed that a network is layers of neurons, each multiplying inputs by weights and adding them up. Training sets billions of those weights, and nobody writes them. Tokens & Embeddings showed that each word is stored as a list of numbers, and moving in one direction through that list changes one meaning, such as male to female. Precision and Recall (where to set the spam filter's bar) built a spam filter: a weighted sum, squashed into a 0-to-1 score, then a threshold that says yes or no. Attention & the Transformer showed a transformer is a stack of layers, each handing the next a row of numbers per word.

Lesson 27 of 83 in AI

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • May 2024: the model that said it was a bridge
  • Why a trained model is opaque: billions of numbers, none of them labelled
  • A probe: a small classifier that asks the panel one question
  • Features, and superposition: more ideas than lights
  • The sparse autoencoder: a dictionary that pulls features apart
  • Steering: push a feature’s direction, and the behaviour follows
  • What interpretability can and cannot promise today
  • Can a probe tell angry from calm?
  • Five ideas, two lights
  • Eight ideas, four lights, sixteen slots
  • All of it in code

Terms it explains: Tokens and Embeddings, probe, feature, superposition, sparse autoencoder, steering, bias, noise, cosine, loudness, 2).sum() / (H, analogy arithmetic, BPE, cosine similarity, dense vector, dimension d, embedding, embedding matrix, positional encoding, semantic search, static vs contextual embedding, token, token ID, tokenizer, vector database, vector space, vocabulary.

Lab

One sentence, one tokenizer, a vocabulary you can grow. How many tokens does it cost?

Drag How many pieces it knows left to right, then open the tab Another script, and an emoji, and watch How many tokens.

Open Tokens and embeddings

Related papers

Review AI