Guided pathThis is part of Understand Transformers & BERTBack to the path

Embeddings

P10.text-representation.03 · Audience: guest, it-ml, language-pro · Prerequisites: Tokenization

Customise the corpus these labs use

From raw co-occurrence counts to dense word vectors — the corpus as the source of meaning. Every vector on this page is derived from corpus statistics, not random initialisation.

Step 1 / 5What Is an Embedding Table?
🗣️ From a linguist's perspective: the meaning dictionary
An embedding table is a dictionary whose definitions are written in numbers: one row per vocabulary word, and the row IS the word's meaning profile — position on axes the corpus itself determines.
ⓘ Concept: The table
V rows (one per word), d_model columns (the meaning dimensions). Below is the whole table for our corpus, as a heatmap.
ei=E[i,:],ERV×dmodele_i = E[i,:],\qquad E \in \mathbb{R}^{V \times d_{\mathrm{model}}}

Why it matters — This table is the model's entire lexical knowledge — GloVe shipped exactly such a matrix for 400k words; every LLM still starts with one.

Reference: Pennington et al. 2014 — GloVe

Computing…

📚 Go further

Check your understanding

Where do the numbers in the embedding table come from on this page?

What does a larger window size change in the co-occurrence matrix?

Why is the embedding lookup so cheap?

Ask the mentor about this module

Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.

Ctrl/Cmd + Enter to send

Try it yourself

A scratch console for this page's ideas — ungraded, nothing you run here is recorded.

Scratch console

A scratch console with the scientific stack (pandas, numpy, scikit-learn). Runs on the server — no network, resource-limited and measured.

Output appears here.