In this article
Selective training and selective saving are separate contracts; omitting full embedding weights is safe only when every relevant change is represented by the saved token state.
PEFT Trainable Tokens targets selected embedding rows instead of optimizing and storing an entire vocabulary matrix. This is useful for controlled updates to a small token set. However, the number of trained rows does not alone determine the saved artifact: resizing an embedding matrix can trigger a separate full-matrix saving precaution.
Separate vocabulary changes from row training
The method does not create tokenizer entries automatically. Adding tokens and resizing the model’s input embeddings are separate preparation steps. Preserve the resulting token-to-identifier mapping before selecting trainable indices. If another tokenizer assigns different identifiers, the same list of row numbers can modify unrelated tokens while remaining a valid tensor operation.
Inspect the trained module set
Check the actual embedding module selected by configuration and any additional adapted layers. A model can share input and output weights or use separate output parameters. Record how the installed architecture handles that relationship. Training only selected input rows does not establish that every other vocabulary-related tensor remains consistent after a custom modification or export.
Understand the full-matrix save behavior
PEFT documents that saving after token additions may retain the full embedding matrix as a precaution. A small trainable-row count can therefore coexist with a large saved file. The compact-saving option should be used only when other embedding modifications do not need preservation outside the tracked token changes. Otherwise a space-saving export can silently omit state that affected the evaluated model.
Test reconstruction in a fresh process
Retain the base revision, resized tokenizer, selected token identifiers and saved token state. Reload without relying on the training process’s already modified embedding matrix. Compare both selected tokens and ordinary vocabulary behavior on fixed inputs. This catches artifacts that work only because an unsaved resize or external embedding update remains in memory.
Evaluate task utility beyond file size
For an illustrative structured-label task, measure held-out output validity and correctness, including adjacent ordinary text. The method supports learning existing token rows as well as newly added ones, so state which case is intended. A compact file is useful only if it reconstructs the right model and its chosen serving implementation supports the selective-token state. Treat training memory, saved bytes and task behavior as separate observations.
Primary references
Related explanations: vocabulary and embedding resizing; input-output weight tying.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.