mlsanityData to 14 Oct 2026

zip2zip: Inference-Time Adaptive Tokenization via Online Compression

arXiv 2506.01084 ↗First posted 1 Jun 2025cs.CL cs.LGcited by 5

Not on the map. Why?

Abstract (arXiv)

Tokenization efficiency plays a critical role in the performance and cost of large language models (LLMs), yet most models rely on static tokenizers optimized on general-purpose corpora. These tokenizers' fixed vocabularies often fail to adapt to domain- or language-specific inputs, leading to longer token sequences and higher computational costs. We introduce zip2zip, a novel method for achieving context-adaptive tokenization in LLMs at inference time. Leveraging an online data compression algorithm (Lempel-Ziv-Welch), zip2zip dynamically expands its active vocabulary at inference time by continuously replacing fragmented token sequences with more compact hypertokens, which it can immediately output during generation. In doing so, the model refines its internal tokenization scheme to match the token distribution of the current context, reducing redundancy and improving representational efficiency. zip2zip consists of three key components: (1) a tokenizer based on Lempel-Ziv-Welch compression that incrementally merges co-occurring tokens into reusable hypertokens on the fly; (2) a dynamic embedding (and unembedding) layer that computes embeddings for newly formed hypertokens at runtime; and (3) a variant of autoregressive language modeling that pretrains the model to handle hypertokenized, compressed text sequences as inputs and outputs. We show that an existing LLM can be uptrained for zip2zip in 10 GPU-hours via parameter-efficient finetuning. The resulting LLM performs test-time adaptation, learning to use hypertokens in unseen contexts and reducing input and output tokens by 15-40%.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 49 of its 60 references that are in the map. First posted on arXiv 1 Jun 2025.

Builds on

49 of 60 references.

References · 49

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  4. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  5. 2020Scaling Laws for Neural Language Modelscited by 6,586
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  7. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  8. 2016Pointer Sentinel Mixture Modelscited by 3,096
  9. 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
  10. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  11. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  12. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
37 more
  1. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  2. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  3. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  4. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  5. 2024A Survey on Large Language Models for Code Generationcited by 658
  6. 2023Capabilities of GPT-4 on Medical Challenge Problemscited by 638
  7. 2023Learning to Compress Prompts with Gist Tokenscited by 390
  8. 2023Adapting Language Models to Compress Contextscited by 356
  9. 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 214
  10. 2019WinoGrande: An Adversarial Winograd Schema Challenge at Scalecited by 204
  11. 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 199
  12. 2023Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Modelscited by 192
  13. 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 189
  14. 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 170
  15. 2024Byte Latent Transformer: Patches Scale Better Than Tokenscited by 146
  16. 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 115
  17. 2021Hierarchical Transformers Are More Efficient Language Modelscited by 102
  18. 2022Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Modelscited by 97
  19. 2023XLM-V: Overcoming the Vocabulary Bottleneck in Multilingual Masked Language Modelscited by 88
  20. 2022Efficient Transformers with Dynamic Token Poolingcited by 76
  21. 2024Getting the most out of your tokenizer for pre-training and domain adaptationcited by 66
  22. 2025SuperBPE: Space Travel for Language Modelscited by 63
  23. 2023Paloma: A Benchmark for Evaluating Language Model Fitcited by 54
  24. 2024SpaceByte: Towards Deleting Tokenization from Large Language Modelingcited by 34
  25. 2024Zero-Shot Tokenizer Transfercited by 31
  26. 2019Improving Pre-Trained Multilingual Models with Vocabulary Expansioncited by 28
  27. 2023Task-Adaptive Tokenization: Enhancing Long-Form Text Generation Efficacy in Mental Health and Beyondcited by 23
  28. 2025CAT: Content-Adaptive Image Tokenizationcited by 21
  29. 2024Multi-word Tokenization for Sequence Compressioncited by 17
  30. 2024Training LLMs over Neurally Compressed Textcited by 17
  31. 2024Retrofitting Large Language Models with Dynamic Tokenizationcited by 16
  32. 2024Efficient and Effective Vocabulary Expansion Towards Multilingual Large Language Modelscited by 15
  33. 2024Gold Panning in Vocabulary: An Adaptive Method for Vocabulary Expansion of Domain-Specific LLMscited by 12
  34. 2023Learn Your Tokens: Word-Pooled Tokenization for Language Modelingcited by 8
  35. 2023Toucan: Token-Aware Character Level Language Modelingcited by 8
  36. 2024Generation with Dynamic Vocabularycited by 6
  37. 2025Overcoming Vocabulary Constraints with Pixel-level Fallbackcited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 3.

5 papers.