MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformers
Lili Yu, Daniel Simig, Colin Flaherty, Armen Aghajanyan, Luke Zettlemoyer, Mike Lewis
Abstract
Autoregressive transformers are spectacular models for short sequences but scale poorly to long sequences such as high-resolution images, podcasts, code, or books. We proposed Megabyte, a multi-scale decoder architecture that enables end-to-end differentiable modeling of sequences of over one million bytes. Megabyte segments sequences into patches and uses a local submodel within patches and a global model between patches. This enables sub-quadratic self-attention, much larger feedforward layers for the same compute, and improved parallelism during decoding -- unlocking better performance at reduced cost for both training and generation. Extensive experiments show that Megabyte allows byte-level models to perform competitively with subword models on long context language modeling, achieve state-of-the-art density estimation on ImageNet, and model audio from raw files. Together, these results establish the viability of tokenization-free autoregressive sequence modeling at scale.
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.
52 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
- Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecture cites Efficiently Modeling Long Sequences with Structured State Spaces
- Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecture cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecture cites Reformer: The Efficient Transformer
- Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecture cites Language Models are Few-Shot Learners
- 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
- Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabularies cites Language Models are Few-Shot Learners
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling cites Byte Latent Transformer: Patches Scale Better Than Tokens
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling cites Efficiently Modeling Long Sequences with Structured State Spaces
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling cites Language Models are Few-Shot Learners
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling cites Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabularies
Cited by top-tier papers52
- Scaling Laws with Vocabulary: Larger Models Deserve Larger VocabulariesChaofan Tao, Qian Liu, Longxu Dou, Niklas Muennighoff et al.NeurIPS 2024 · 135 citations
- Byte Latent Transformer: Patches Scale Better Than TokensArtidoro Pagnoni, Ramakanth Pasunuru, Pedro Rodríguez, John Nguyen et al.ACL 2025 · 116 citations
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program RepairKai Huang, Xiangxin Meng, Jian Zhang, Yang Liu et al.ASE 2023 · 91 citations
- Monarch Mixer: A Simple Sub-Quadratic GEMM-Based ArchitectureDaniel Y. Fu, Simran Arora, Jessica Grogan, Isys Johnson et al.NeurIPS 2023 · 80 citations
- Dynamic Chunking for End-to-End Hierarchical Sequence ModelingSukjun Hwang, Brandon Wang, Albert GuICLR 2026 · 76 citations
Builds on16
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 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
- Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
Related papers
- General-purpose, long-context autoregressive modeling with Perceiver ARCurtis Hawthorne, Andrew Jaegle, Catalina Cangea, Sebastian Borgeaud et al.ICML 2022 · 83 citations
- SpaceByte: Towards Deleting Tokenization from Large Language ModelingKevin SlagleNeurIPS 2024 · 34 citations
- ByteFlow: Language Modeling through Adaptive Byte Compression without a TokenizerChunyuan Deng, Sanket Lokegaonkar, Colin Lockard, Besnik Fetahu et al.ICLR 2026 · 1 citation
- Fast Byte Latent TransformerJulie Kallini, Artidoro Pagnoni, Tomasz Limisiewicz, Gargi Ghosh et al.ICML 2026
- 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
