Moving a Vocabulary

A vocabulary learned under one tokenization scheme may need to be used under another. We will follow what happens to its pieces, including boundaries that disappear and entries that become indistinguishable after the move.

14 sections · 14 questions · 4 coding challenges

1 / 14

What Happens to a Learned Word Vector When Its Address Changes?

BOTIE

A pretrained model's embedding table belongs to a particular vocabulary. If we adapt the model to another language or domain, a new vocabulary may describe the text more efficiently. But an ID in the new vocabulary can name a different piece from the same ID in the old one.

Vocabulary transfer became a practical part of adapting pretrained language models. The 2022 WECHSEL work investigated initialising a new subword embedding table from information in an existing model, so that changing the vocabulary did not require discarding all useful representation knowledge.

We first preserve the association between each piece and its learned vector. Shared pieces can be copied by identity into their new rows; unfamiliar pieces require an explicit initialisation or transfer rule. This lesson examines that bookkeeping with simpler policies. Transferring a table supplies a starting point, while further training and evaluation determine whether the adapted model uses the new segmentation successfully.

Sources for this history