AI Glove Tutorial: Subword Embeddings

TL;DRGloVe and subword embeddings refined the idea — global stats and handling unknown words.

GloVe built embeddings from global word co-occurrence counts rather than local windows. Subword approaches (fastText, BPE) embed pieces of words, so a model can represent rare or unseen words by their parts ("unhappiness" = un + happi + ness) — fixing word2vec's out-of-vocabulary blind spot. Subword tokenization is now standard in LLMs, which is why they handle novel words gracefully.

Key points

Common mistakes

Try it: Explain how subword embeddings represent a word the model never saw.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>unseen word "unhappiness"
→ subwords: un + happi + ness (each embedded)
→ no out-of-vocabulary blind spot</pre></body></html>
Open the interactive lesson →
Word2vec · The Breakthrough Cnns · Convolutional Neural Networks