CALCULATE · INSPECT · COMPARE
Embedding lookup: track IDs to stored rows
Trace each coordinate copied from a six-token embedding table.
On narrow screens, scroll the diagram horizontally or focus it and use the arrow keys to inspect full-size labels. Exact values follow below.
Your experiment
Enter 1,3,1: the first and third output rows must match exactly. Change the middle ID; only the middle output row changes when the table is unchanged. An ID outside 0–5 is rejected rather than silently clipped.
Play inspects the entire calculated trace over 60 seconds at 1×. Use 0.5× for two minutes, pause, or step through individual operations. Restart preserves your inputs. Changing a model input rebuilds the calculation without autoplay.
What the calculation means
Each token ID indexes one row. No dot products are required for the lookup itself. This is a six-token integer-ID fixture, not text tokenization, learned semantic similarity, positional encoding or a language model.
Matrix values at this step
Canvas and tables round labels for readability. The inspector preserves full JavaScript number values.
Full-precision operation inspector
A bounded mathematical teaching model. Playback measures inspection time, not computation or training latency. No model weights are downloaded; no external inference, storage or training is performed. Read the official AICassindra articles.
Embedding Lookup: Control Guide and Exact Experiments: experiment guide
Token IDs accepts one through five comma-separated integers from zero through five. Each ID selects one row from a six-row embedding table E. Embedding width chooses two through six coordinates per stored row. Matrix fixture seed chooses a reproducible integer from one through fifty, changing the generated table. Embedding scale multiplies every generated table value by the selected factor from −2 through 2, in steps of one quarter. The fixture uses small deterministic integers before scaling. It is not a learned vocabulary, and a seed does not train or improve an embedding. Inspect the E table to see exactly what each ID will return before advancing the copy operations.
Worked details 1
The output Lookup has one row per supplied ID and one column per embedding coordinate. Lookup[i,j] equals E[ID[i],j]. Each animation step copies one scalar, increments one logical read and one logical write, and performs no multiply-accumulate. Scaling is part of fixture construction, not an extra multiplication charged to every lookup operation. The initial output is zero-filled; unrevealed zeros are pending writes, not evidence that the selected embedding coordinate is zero. The highlighted cells identify both the source and destination, and the caption states the copied value. Matrix tables and the full-precision operation inspector provide text alternatives to the canvas and its rounded labels.
Worked details 2
Use the opening IDs 1,3,1 with width three, seed seven and scale one. At the end, the first and third output rows must match exactly because they copied the same stored row. In this fixture E[1] is (−1,2,−1) and E[3] is (−2,3,−3), so Lookup is those first, second and repeated first rows. There are nine scalar copies, nine reads, nine writes and zero multiply-accumulates. Change the middle ID to 2 while preserving every other input. Only the middle output row changes. Change scale to zero: every embedding and output coordinate becomes zero, but the same nine copies still occur. A negative scale reverses signs. Width changes both shape and how the seeded generator is consumed, so do not assume the old table remains a coordinate prefix.
Worked details 3
Play spreads the operation trace across sixty teaching seconds and becomes Pause while running. Next operation pauses and advances one operation. Restart pauses at the initial operation and preserves all inputs. Speed offers 0.25, 0.5, 1 or 2 times the presentation rate; Inspection seeks to a paused position from zero to sixty seconds. Changing width, seed, scale or IDs rebuilds the calculation without autoplay. There is no reset-to-defaults control: restore the opening values manually when reproducing the experiment. An out-of-range ID such as 6, an empty list, a fractional ID or more than five IDs disables playback and clears the invalid calculation until corrected. The seed is deterministic only for the complete configuration. This lesson omits text tokenization, positional encoding, semantic similarity, gradient scatter-add and tied output projection; lookup alone does not generate text or measure inference speed.