Token-Free and Byte-Level Language Models › Architectures That Make Bytes Practical
Language AI HandbookAll chapters Five research lines have shaped how byte-level modeling is done in practice. They differ in what counts as a position, in whether the grouping is fixed or learned, and in whether the model generates text.
The five are worth studying together because they are not variations on a theme. They are five different answers to the same question, which is how to recover the compression that a tokenizer used to provide. CANINE answers it with a fixed architectural stride. ByT5 answers it by declining to compress at all. MEGABYTE answers it with a fixed data layout. BLT answers it with an external uncertainty signal. H-Net answers it by learning the signal inside the model. Seeing them side by side makes the design space legible.
Code-Point Encoders with Downsampling (CANINE)
Clark and colleagues’ CANINE encodes Unicode code points with hashed embeddings. It applies a local attention layer before strided convolution reduces the sequence length seen by the deep Transformer encoder. The paper uses a stride of four. CANINE paper
Local attention composes nearby code points before downsampling. The deep Transformer then processes that shorter sequence. The reduction is relative to the code-point input; the length a subword tokenizer would produce depends on the text and tokenizer.
The hash tables cover the input code points without one embedding row per code point. Canonically equivalent sequences can still have distinct code-point inputs unless preprocessing normalizes them.
CANINE-C predicts bucketed code-point IDs from masked inputs. CANINE-S uses subword prediction targets during pretraining. Both feed code points to the encoder at inference.
The subword-target variant uses the tokenizer to define supervision while keeping code-point input at inference. Compare the variants on the individual tasks to determine where that supervision helps.
CANINE is an encoder that produces contextual representations. The paper's experiments used sequences of up to 2,048 code points, with 512 positions in the deep encoder at stride four.
Clark and colleagues evaluate the encoder on multilingual TyDi QA and NER. Their results show how a code-point encoder with downsampling can compete in the tested settings. CANINE paper
Byte-to-Byte Encoder-Decoders (ByT5)
Xue and colleagues’ ByT5 uses a T5-family encoder-decoder to model UTF-8 bytes. The paper describes 256 byte values and three reserved IDs for padding, end of sequence and an unused unknown marker. ByT5 paper
Relative to mT5, the authors use a smaller embedding vocabulary, allocate more model layers to the encoder than the decoder and adjust span corruption for byte sequences.
The paper compares ByT5 with mT5 at several model sizes. It reports competitive results and gains on selected tasks sensitive to character-level detail. Throughput depends on the length of the input and the target. Longer byte targets can impose a substantial decoding cost.
Those results are conditional on the paper's model sizes, datasets, and compute budget. They do not establish that byte models are universally more robust or universally more efficient. A reasonable reading is that the byte interface removes a class of tokenizer-induced failures and pays for it with sequence length. Whether the trade is worth it depends on the task.
An unusual spelling can change the subword segmentation and sequence length. A byte interface preserves the underlying bytes. The robustness experiments measure whether the trained model handles selected perturbations correctly.
An autoregressive byte decoder predicts each of the content bytes in the target, with another prediction if it emits EOS. A subword decoder uses the token count for the same target. Report the number of generated bytes and the latency along with decode steps when comparing both systems.
Fixed-Width Patches (MEGABYTE)
Yu and colleagues’ MEGABYTE splits the byte sequence into patches of width . A global Transformer attends over patch representations. A local Transformer generates the bytes of each patch using its global representation and the bytes already generated in that patch. The paper also describes a cross-patch variant that gives the local model access to trailing bytes of the previous patch. MEGABYTE, §2.3.2
The factorization is
where counts the patches. The local model factorizes each patch probability autoregressively over its bytes. During autoregressive generation the global model advances once per patch and the local model advances once per byte. With fixed-width patches and fixed local context, local attention work per byte is bounded. Its total work grows linearly with byte count.
With fixed patch width, the total length of the local sequences grows linearly in the number of bytes. The global position count also grows with sequence length, so dense global attention retains a quadratic term. The width reduces the coefficient by reducing the count of global positions.
Fixed width gives a predictable number of patches for each byte length. The paper's 640 × 640 RGB ImageNet experiment processes 1,228,800 bytes per image. The dense Transformer baseline in that comparison uses 1,024-byte segments. The paper's text experiments include MEGABYTE configurations with 8,192-byte context on arXiv and PG-19. MEGABYTE, Tables 2, 3 and 5 and Appendix A.2
Fixed offsets can coincide with word boundaries or split words and multibyte scalars. A fixed-width schedule still advances the global model across predictable spans. Entropy-driven and learned routing vary that schedule with the content.
Entropy-Driven Patches (Byte Latent Transformer)
Pagnoni and colleagues’ Byte Latent Transformer uses next-byte entropy to place variable-width boundaries. A separately trained byte language model estimates the distribution of each byte from prior bytes. The paper compares an absolute entropy threshold with a threshold on increases relative to the previous entropy. Byte Latent Transformer paper
The boundary model’s entropy is its expected next-byte surprisal. BLT uses high entropy as a signal to allocate another patch. That makes the budget depend on the input. Whether the extra global step helps at a particular location is an empirical question.
The architecture has three parts. The local encoder contextualizes nearby bytes and builds each patch representation from the encoded bytes in that patch. The global Transformer attends over patch representations, and the local decoder uses global context to predict bytes. The entropy model supplies the patch boundaries. Byte Latent Transformer, §3
For BLT’s pre-byte boundary, the decision to start a patch at uses the entropy model’s distribution given . It can be made before seeing the target byte. Check the shift from context outputs to predicted positions. A rule that allocates a representation after consuming the current byte needs a different account of which output it scores.
For logits computed at each input position, check which next position the logits predict before comparing entropies. A shift that lets the boundary for byte depend on byte exposes information unavailable before prediction.
For this pre-byte rule, the boundary decision at byte position depends only on bytes before . A truncated input and its extension agree on boundary starts strictly inside the truncated input. The last patch of the truncated input can still be shorter.
Check agreement on boundary starts strictly inside a truncated prefix. To check whether a rule reads the current byte, also keep the first bytes fixed, change the byte at zero-based index , and compare the boundary decision at that index.
The authors report quality comparable to their tokenization-based baselines at scales up to 8 billion parameters and 4 trillion training bytes. They separately report configurations that trade small drops on evaluation metrics for up to 50% fewer inference FLOPs. They also report gains on some character-level perturbation benchmarks. Byte Latent Transformer, §§5 and 6
A fixed stride spends a global update at regular intervals. The entropy rule makes that allocation depend on the predictions of its boundary model. It cannot tell us by itself which extra updates improve the final model.
Learned Routing (H-Net)
Sukjun Hwang, Brandon Wang, and Albert Gu introduce H-Net, which learns dynamic chunk boundaries as part of a hierarchical model. The work appeared at ICLR 2026. ICLR 2026 proceedings
The routing module compares projected representations at adjacent positions using cosine similarity. It converts the score to a boundary decision. The downsampler selects the representations at those boundaries for the coarser level. H-Net paper
The authors use decompression smoothing and a straight-through estimator to train through discrete chunk decisions. BLT’s entropy threshold comes from a separate predictive model. H-Net learns its routing scores jointly with the model that uses them.
The reported results show H-Net outperforming BPE-based transformers at matched compute in the paper's settings, with the advantage persisting as scale increases. Those are results at the scales the paper tested, and hierarchical routing is a young technique. It is best read as evidence that learned grouping is a promising direction rather than as a settled replacement for either fixed patching or subword tokenization.
Comparing the Families
The five architectures answer different questions.
| Model | Input unit | Grouping | Generates text | Primary claim |
|---|---|---|---|---|
| CANINE | Unicode code point | Fixed stride downsampling | No | Tokenizer-free encoding is competitive for understanding tasks |
| ByT5 | UTF-8 byte | None | Yes | Direct byte modeling works end to end, with length costs |
| MEGABYTE | Raw byte, including UTF-8 for text | Fixed-width patches | Yes | Models full 1,228,800-byte RGB images in the reported experiment |
| BLT | UTF-8 byte | Entropy-driven variable patches | Yes | Varies model size and patch width under fixed FLOP budgets in the reported scaling study |
| H-Net | UTF-8 byte | Learned routing | Yes | Grouping can be learned end to end with the model |
The progression from CANINE to H-Net is a progression in where the grouping decision lives. CANINE fixes it in the architecture. MEGABYTE fixes it in the data layout. BLT derives it from a separate model's uncertainty. H-Net learns it as part of the network. Each step moves more of the tokenizer's old job inside the model, which is the underlying theme of this whole part of the book.
Read the table with the caveats from the next section in mind. The "primary claim" column is a summary of what each paper argues, not a statement that the claim has been independently replicated. The models were evaluated on different data, at different scales, against different baselines, so the rows are not a leaderboard.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!