Dynamic Chunking for End-to-End Hierarchical Sequence Modeling
Abstract
Major progress on language models (LMs) in recent years has largely resulted from moving away from specialized models designed for specific tasks, to general models based on powerful architectures (e.g. the Transformer) that learn everything from raw data. Despite this trend, pre-processing steps such as tokenization remain a barrier to true end-to-end foundation models. We introduce a collection of new techniques that enable a dynamic chunking mechanism which automatically learns content-and context-dependent segmentation strategies learned jointly with the rest of the model. Incorporating this into an explicit hierarchical network (H-Net) allows replacing the (implicitly hierarchical) tokenization-LMdetokenization pipeline with a single model learned fully end-to-end. When compute-and data-matched, an H-Net with one stage of hierarchy operating at the byte level outperforms a strong Transformer language model operating over BPE tokens. Iterating the hierarchy to multiple stages further increases its performance by modeling multiple levels of abstraction, demonstrating significantly better scaling with data and matching the token-based Transformer of twice its size. H-Nets pretrained on English show significantly increased character-level robustness, and qualitatively learn meaningful data-dependent chunking strategies without any heuristics or explicit supervision. Finally, the H-Net's improvement over tokenized pipelines is further increased in languages and modalities with weaker tokenization heuristics, such as Chinese and code, or DNA sequences (nearly 4× improvement in data efficiency over baselines), showing the potential of true end-to-end models that learn and scale better from unprocessed data. 1 Many other edge cases have been discussed in informal online discourse rather than papers; we defer to Andrej Karpathy's lectures and tweets. 2 An extended related work can be found in Appendix A, which is summarized in Table 6 .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
17 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Context-level Language Modeling by Learning Predictive Context Embeddings cites Language Models are Few-Shot Learners
- Proxy Compression for Language Modeling cites From Bytes to Ideas: Language Modeling with Autoregressive U-Nets
- Proxy Compression for Language Modeling cites zip2zip: Inference-Time Adaptive Tokenization via Online Compression
- Efficiently Modeling Long Sequences with Structured State Spaces cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
- From Bytes to Ideas: Language Modeling with Autoregressive U-Nets cites Language Models are Few-Shot Learners
- Language Models are Few-Shot Learners cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
- zip2zip: Inference-Time Adaptive Tokenization via Online Compression cites Language Models are Few-Shot Learners
Cited by top-tier papers17
- From Bytes to Ideas: Language Modeling with Autoregressive U-NetsMathurin Videau, Badr Youbi Idrissi, Alessandro Ferreira Leite, Marc Schoenauer et al.NeurIPS 2025 · 14 citations
- Context-level Language Modeling by Learning Predictive Context Embeddingsbeiya dai, Yuliang Liu, Yunchong Song, Daozheng Xue et al.ICML 2026 · 5 citations
- zip2zip: Inference-Time Adaptive Tokenization via Online CompressionSaibo Geng, Nathan Ranchin, Yunzhen Yao, Maxime Peyrard et al.NeurIPS 2025 · 5 citations
- Proxy Compression for Language ModelingLin Zheng, Li Xinyu, Qian Liu, Xiachong Feng et al.ICML 2026 · 3 citations
- MergeDNA: Context-Aware Genome Modeling with Dynamic Tokenization Through Token MergingSiyuan Li, Kai Yu, Anna Wang, Zicheng Liu et al.AAAI 2026 · 2 citations
Builds on56
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
- WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 citations
Related papers
- ByteFlow: Language Modeling through Adaptive Byte Compression without a TokenizerChunyuan Deng, Sanket Lokegaonkar, Colin Lockard, Besnik Fetahu et al.ICLR 2026 · 1 citation
- LDARNet: DNA Adaptive Representation Network with Learnable Tokenization for Genomic ModelingDaria Ledneva, Denis KuznetsovICML 2026 · 1 citation
- Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language ModelsPit Neitemeier, Björn Deiseroth, Constantin Eichenberg, Lukas BallesICLR 2025
- From Characters to Tokens: Dynamic Grouping with Hierarchical BPERares Dolga, Lucas Maystre, Tudor Berariu, David BarberEMNLP Findings 2025 · 1 citation
- Learn Your Tokens: Word-Pooled Tokenization for Language ModelingAvijit Thawani, Saurabh Ghanekar, Xiaoyuan Zhu, Jay PujaraEMNLP Findings 2023 · 4 citations
