atlas

Research map / Large language models / Reasoning and chain of thought

zip2zip: Inference-Time Adaptive Tokenization via Online Compression

NeurIPS 2025 · Large language models › Reasoning and chain of thought · approach: Efficient LLM serving · 0 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.

Proposes zip2zip, which applies online LZW compression at inference time to create hypertokens, with a hyper-encoder for their embeddings, and uptrains Phi-3 models via LoRA to cut token counts by 15-40%.

Problem

Static tokenizers with fixed vocabularies fragment domain- or language-specific text into long token sequences, raising compute, latency and cost; enlarging vocabularies yields diminishing returns and static vocabularies cannot adapt at inference time.

Approach

Dynamically expand the active vocabulary during decoding by running online LZW compression over base tokens to form hypertokens, embed hypertokens with a learned hyper-encoder over constituent base-token embeddings, and train the LM on LZW-compressed sequences with an auxiliary reconstruction loss.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply zip2zip tokenizationLlama-3-128K, Qwen-2-150K, Phi-4-200K, and Gemma-3-256K tokenizers · Code, math, chat, multilingual, and webbytes/token: Code gains +54% to +70%; math gains +48% to +61%Helped
Use zip2zip continued pretraining instead of base weightsPhi-3.5-4B and Phi-3-14B · GSM8Kaccuracy: 0.82 -> 0.15; 0.84 -> 0.25Hurt
Use zip2zip continued pretraining instead of base weightsPhi-3.5-4B and Phi-3-14B · Wikitext, The Pile, mC4, and dC4byte-level perplexity: Phi-3.5-4B Wiki: 1.58 -> 1.69; Phi-3-14B Wiki: 1.43 -> 1.56Hurt
Use zip2zip instead of continued pretrainingPhi-3.5-4B and Phi-3-14B · WMT14 En-Fr and WMT16 En-De/En-RoBLEU: Phi-3.5-4B WMT14 En-Fr: 36.5 -> 34.1; WMT16 En-De: 42.3 -> 39.7; Phi-3-14B WMT16 En-De: 48.4 -> 44.8Mixed
Use zip2zip inferencePhi-3.5-4B on H100 · 512+256 context and generationprefill throughput: +102.6%Helped
Use zip2zip inferencePhi-3.5-4B on H100 · 512+256 context and generationdecode throughput: +46.6%Helped
Use zip2zip inferencePhi-3.5-4B on Apple M1 · 256+256 context and generationprefill throughput: -11.8%Hurt
Set maximum merge size M to 3 rather than M=1 (ablation)zip2zip · Wiki, Pile, mC4, and dC4byte-level perplexity: Wiki: 1.62 -> 1.72; Pile: 1.70 -> 1.84; mC4: 2.00 -> 2.15; dC4: 1.91 -> 2.00Mixed
Set maximum merge size M to 3 rather than M=2 (ablation)zip2zip · Wiki, Pile, mC4, and dC4byte-level perplexity: Wiki: 1.96 -> 1.72; Pile: 2.21 -> 1.84; mC4: 2.55 -> 2.15; dC4: 2.22 -> 2.00Helped
Increase maximum merge size from M=3 to M=4 or M=5 (ablation)zip2zip · Wiki, Pile, mC4, and dC4byte-level perplexity: M=3: 1.72, 1.84, 2.15, 2.00; M=4: 1.71, 1.84, 2.14, 1.99; M=5: 1.72, 1.84, 2.14, 1.99No clear effect
Replace averaging with a 1-attention-layer hyper-encoder (ablation)zip2zip · Wiki byte-level perplexitybyte-level perplexity: 1.81 -> 1.73Helped
Replace averaging with a 1-transformer-layer hyper-encoder (ablation)zip2zip · Wiki byte-level perplexitybyte-level perplexity: 1.81 -> 1.71Helped

Surprising findings

Limitations

Experimental setup

Datasets: HuggingFaceFW/fineweb-edu devngho/the-stack-llm-annotations-v2 AI-MO/NuminaMath-1.5 HuggingFaceH4/ultrachat_200k HuggingFaceFW/fineweb-2 Wikitext The Pile Paloma (mC4, dC4) WMT14 WMT16

Benchmarks: ARC-Challenge ARC-Easy HellaSwag OpenbookQA PIQA Winogrande GSM8K LAMBADA WMT14 En-Fr WMT16 En-De WMT16 En-Ro Wikitext

Metrics: accuracy byte-level perplexity BLEU CHRF TER bytes per token (token efficiency) throughput (tokens/sec)

Baselines: Base model (Phi-3.5-4B, Phi-3-14B) Continued pretraining with LoRA HuggingFace fast BPE tokenizer Dynamic Vocab

Builds on: byte pair encoding LoRA Lempel-Ziv-Welch compression Dynamic Vocab

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