Skip to main content
Independent Digital Museum of Artificial Intelligence · Laboratory
Accessibility

These choices are saved only on this device.

Laboratory · Interactive exhibit LAB-04

From words to tokens, and to the relations between them

Type a sentence, see how a small vocabulary splits it into subwords, then select a token to inspect attention weights toward the others.

Type: teaching simulation with a real attention calculation

Try a sentence

1. Three views of the same text

Words and punctuation

Museum subword tokenizer

The ▁ symbol marks the beginning of a word. Real tokenizers learn much larger vocabularies from corpora and differ between models.

2. Select a token and inspect attention

Select a token. Each bar shows the weight assigned from that token to every position in this small synthetic layer.

Attention(Q,K,V) = softmax(QKᵀ / √d) V

Documentation

The exhibit connects two important technical ideas: subword units in neural machine translation and the Transformer’s scaled dot-product attention.

Visitor input is not sent to an external server or model.