Shows how a discrete token id i selects a row from the embedding matrix E (a learnable lookup table). The selected row E[i] is highlighted and displayed as a length-d vector, while an animated “lookup packet” travels from the token list to the corresponding row. A simple training-like update continuously nudges only the selected row’s values to illustrate embeddings as learned parameters.
Pure Canvas2D. Uses a closure to maintain an embedding matrix E and performs a small continuous update on the currently selected row to simulate training. Layout and shapes are grid-snapped for a blocky aesthetic; animation cycles via step-based token selection plus eased packet motion.