Awesome Testing

Lesson 03 · IDs become vectors

How can a categorical ID become something a neural network can transform?

Unfinished prompt

The animal did not cross the street because it was too

01 · Smallest useful mechanism

Identity plus place becomes model input

A token ID is only an address. The model uses it to look up a trainable vector that gives the token a useful starting representation. Identity alone cannot distinguish “dog bites person” from “person bites dog,” so the model also needs position information. The token signal and position signal are combined before or within attention, depending on the architecture. This is still only a starting state, not the rich contextual meaning formed by later blocks. The same token can begin with the same lookup vector in two sentences and develop different internal states as it gathers different context. The observatory uses real static GloVe word vectors to make neighborhoods, directions, and analogy arithmetic inspectable; it demonstrates learned geometry without pretending those rows are Bonsai’s private token weights.

A token ID selects a learned vector; position makes word order available.

02 · Experiment

Test the prediction

Calculate by hand · inspect vector geometry

Tiny vectors make lookup arithmetic exact. Model-backed embedding traces remain future research.

Glass-box embedding table

Select a token ID, then inspect its row.

IDs and values are intentionally tiny teaching data. The operation is exact; the values are not captured Bonsai parameters.

Initial residual state · position 4

E[1846][0.55, 0.12]
+ P[4][0.24, -0.09]
= R₀[0.79, 0.03]
too” now has a vector at a specific position. It is not yet contextual and it is not a sentence embedding for search.

GloVe 6B · real 50D vectors

Explore relationships, not twelve invented dots.

Search 181 words, inspect cosine neighbors, solve analogies, find an outlier, and build a semantic direction.

The full dataset and 3D projection load only when opened.

03 · Production-minded practice

Keep lookup geometry honest

Commit to a written claim and evidence plan. The Lab stores the draft locally and never sends it to a server.

Your learning artifact

Write the argument you would defend

Stored only in this browser. No account required; course reset does not delete it.

04 · Check your understanding

Which vector is intended for semantic document retrieval?

Optional referenceDeep dive / reference chapterOpen the complete essay, diagrams, mathematics, exercises, glossary, and sources when you want more depth.

Next: A transformer block repeatedly changes these position-specific states with two different jobs.