atlas

Research map / Large language models / Language, safety and interpretability

Zero-Shot Tokenizer Transfer

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces zero-shot tokenizer transfer (ZeTT) and a hypernetwork that predicts embeddings for an arbitrary tokenizer, enabling LMs (XLM-R, Mistral-7B) to switch tokenizers with little loss and fast recovery via <1B tokens of continued training.

Problem

Language models are bound to the tokenizer they were trained with; swapping in a new tokenizer (e.g., more efficient for other languages or code) requires embeddings for new tokens, and prior heuristics for initializing them perform near chance in a zero-shot setting.

Approach

Train a hypernetwork that takes a tokenizer's vocabulary (each token decomposed via the original tokenizer and embedded with the original embeddings) and predicts input/output embeddings, trained over a diverse distribution of sampled UnigramLM tokenizers so it generalizes to unseen tokenizers without training on them.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace the original XLM-R tokenizer with a language-specific tokenizer and use ZeTT hypernetwork embeddingsXLM-R with reused English XNLI adapters · XNLI (13-language average)accuracy: 72.6 -> 71.2; -1%Hurt
Replace the original tokenizer with language-specific tokenizersXLM-R with reused English XNLI adapters · XNLI (13-language average)token length: -14%Helped
Use ZeTT hypernetwork instead of FOCUS for zero-shot tokenizer transferMistral-7B · English benchmarks (Avg., GPT2 tokenizer)accuracy: 55.6 -> 73.0Helped
Use ZeTT hypernetwork instead of FOCUS for zero-shot tokenizer transferMistral-7B · HumanEvalPack (Avg. pass@1, StarCoder tokenizer)pass@1: 13.3 -> 23.2Helped
Continue training with the StarCoder tokenizer for 800M tokens rather than continue with the original tokenizerMistral-7B · HumanEvalPack (Avg. pass@1)pass@1: 26.7 -> 27.6Helped
Replace the original tokenizer with language-specific tokenizers and use ZeTT hypernetwork embeddingsMistral-7B · XCOPA (Avg.)accuracy: 54.6 -> 57.1; +3%Helped
Replace the original tokenizer with language-specific tokenizersMistral-7B · XCOPA (Avg.)token length: -54%Helped
Use ZeTT hypernetwork instead of FOCUS for zero-shot transferMistral-7B · Multilingual MMLU (5-shot, German)accuracy: 26.2 -> 43.7Helped
Replace the original tokenizer with a language-specific tokenizer and use ZeTT hypernetwork embeddingsMistral-7B · Multilingual MMLU (5-shot, German)accuracy: 51.6 -> 43.7; -8%Hurt
Add inter-token attention (ablation)ZeTT hypernetwork · Sampled tokenizersbits-per-byte: 1.157 -> 1.118Helped
Add inter-token attention (ablation)ZeTT hypernetwork · GPT-NeoX tokenizerbits-per-byte: 0.902 -> 0.904Hurt
Add inter-token attention (ablation)ZeTT hypernetwork · English UnigramLM tokenizerbits-per-byte: 1.054 -> 1.103Hurt

Surprising findings

Limitations

Experimental setup

Datasets: MADLAD-400 StarCoder data Flan v2 XNLI SICK

Benchmarks: PiQA HellaSwag ARC BoolQ MMLU HumanEvalPack XNLI XCOPA MT-Bench Farsi NLI Dutch NLI Aymara NLI

Metrics: accuracy pass@1 score (1 to 10) bits-per-character relative sequence length change

Baselines: FOCUS FVT OFA Lexical RAMEN WECHSEL

Builds on: FOCUS MIMICK FVT WECHSEL Task Arithmetic

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy