Jargonautica
Language Models Specifically

Vocabulary and Special Tokens

Also called: Vocabulary, Special Tokens

The fixed list of tokens a model knows, plus a handful of markers that are not words at all: start of text, end of turn, and similar. Those markers are how a plain text predictor gets structured into a conversation, and getting them wrong is a common cause of strange behaviour.

Technical view

Vocabulary size trades embedding parameters and softmax cost against sequence length, with modern models typically using between 32,000 and 256,000 entries; larger vocabularies improve multilingual efficiency. Special tokens delimit roles, turns and tool calls, and are usually reserved so user text cannot forge them, though inadequate reservation has been a real source of prompt injection.


Part of AI Terminology Index, section: Language Models Specifically.

How it connects

Vocabulary and Special Tokens links to 5 other terms. The faint lines are links between those terms. See it in the full graph.

TokensTokensEmbedding LayerEmbedding LayerByte Pair EncodingByte Pair EncodingPrompt InjectionPrompt InjectionChat TemplateChat TemplateVocabulary and Special Tokens