Modern language models still rely on fixed, pre-defined subword tokenizations. Once a tokenizer is trained, the LM can only operate at this fixed level of granularity, which often leads to brittle and counterintuitive behaviors even in otherwise strong reasoning models. We introduce ByteFlow Net, a new hierarchical architecture that removes tokenizers entirely and instead enables models to learn their own segmentation of raw byte streams into semantically meaningful units. ByteFlow Net performs compression-driven segmentation based on the coding rate of latent representations, yielding adaptive boundaries \emph{while preserving a static computation graph via Top-K selection}. Unlike prior self-tokenizing methods that depend on brittle heuristics with human-designed inductive biases, ByteFlow Net adapts its internal representation granularity to the input itself. Experiments demonstrate that this compression-based chunking strategy yields substantial performance gains, with ByteFlow Net outperforming both BPE-based Transformers and previous byte-level architectures. These results suggest that end-to-end, tokenizer-free modeling is not only feasible but also more effective, opening a path toward more adaptive and information-grounded language models.
Figures & tables
Figure 1: Architecture of ByteFlow Net . (a) ByteFlow Net’s chunking strategy is primarily driven by the coding rate R of latent representations. As shown in the figure, the model is encouraged to select token boundaries that form pooled subsequences which best compress the original input. (b) Since byte-level sequences are roughly 4× longer, directly applying O(n2d) softmax attention becomes prohibitively expensive. To address this, we adopt sliding-window attention (SWA) combined with canon layers ( Allen-Zhu, 2025 ) , enabling efficient and low-cost token mixing. (c) The beauty of the hierarchical architecture lies in allocating the majority of FLOPs operating at the high-level information (a deep and wide global transformer), while using lightweight local encoders/decoders (shallow and narrow) to quickly process low-level information.
Figure 2: Scaling Trend for Different Architecture Comparison . Validation BPB loss (lower is better) for different architecture approaches on two different scale (600M, left) and (1.3B, right) models. ByteFlow Net achieves better performance with scaling to larger models and data recipe.
Model
Tokenizer
Accuracy ( ↑ )
HellaSwag
WinoGrande
BoolQ
PIQA
ARC-e
ARC-c
Average
600M Models Trained on 50B Tokens (1x Chincilla Ratio ( Hoffmann et al., 2022 ) )
LLaMA ( Dubey et al., 2024 )
BPE
43.12 ±0.87
42.74 ±1.92
62.26 ±0.64
59.43 ±1.25
61.38 ±0.98
25.95 ±1.76
49.15 ±0.73
Byte
LlamaByte ( Dubey et al., 2024 )
37.93 ±1.83
41.84 ±0.59
61.15 ±1.47
58.31 ±0.91
60.24 ±1.68
25.18 ±0.52
47.44 ±1.29
MambaByte ( Wang et al., 2024 )
38.21 ±0.76
41.97 ±1.95
61.48 ±1.14
58.67 ±0.68
60.53 ±1.87
25.42 ±1.03
47.71 ±0.85
Table 1: Zero-shot performance comparison across multiple benchmarks. Evaluation results on six downstream tasks at both 0.6B (50B tokens) and 1.3B (500B tokens) scales. We report average scores over three separate runs to ensure fair comparison.
Llama 3 ∗
Llama 3.1 ∗
ByteFlow Net 1.3B
(1T tokens)
(16T tokens)
(500B tokens)
CUTE
27.5
20.0
51.2 ±2.1
- Contains Char
0.0
0.0
52.8 ±3.2
- Contains Word
55.1
21.6
70.1 ±2.8
- Del Char
34.6
34.3
33.2 ±1.9
- Del Word
27.5
84.5
73.4 ±2.6
Table 2: Performance on character-level benchmark ( Edman et al., 2024 ) . * Baseline results are taken from Pagnoni et al. (2024) .
Method
Type
Formulation
Complexity
Validation BPB Loss ( ↓ )
Task Perf. ( ↑ )
LLaMA Baseline
-
-
-
0.89 ±0.003
49.15 ±0.73
Fixed Stride ( Yu et al., 2023a )
Static
S={i⋅w:i∈N,i⋅w≤T}
O(1)
0.96 ±0.012
45.27 ±1.32
Word Boundaries ( Slagle, 2024b )
Static
S={t:xt∈{space,punct}}
O(T)
0.94 ±0.008
49.38 ±1.22
Random Chunking
Dynamic
P(boundary at t)=prand
O(T)
1.04 ±0.017
41.34 ±1.67
Neural Boundary ( Nawrot et al., 2023 )
Dynamic
pt=σ(htWbound)bt∼Gumbel(pt)
O(T⋅d)
0.90 ±0.006
47.13 ±0.84
Entropy Chunking ( Pagnoni et al., 2024 )
Dynamic
Ht=−∑vP(v∣ht)logP(v∣ht)S=Top-K({Ht}t=1T)
O(T⋅∣V∣)
0.91 ±0.007
47.81 ±0.95
Table 3: Ablation of Different Chunking Strategies for Hierarchical Language Models. We train on ByteFlow Net but ablate on different chunker used in different architecture. Experiments are done on 0.6B on 50B training token scale. We report average scores over three separate runs.
Figure 3: Chunking Strategy Impact on Latent Representation Manifolds. Each point is a contextualized byte representation after the local encoder (after 1B training bytes), projected to 2D by t-SNE. We visualize 10 FineWeb-Edu validation segments, each ∼ 1500 bytes (15k points total); colors denote segments. Poor chunking (random, neural boundaries) fragments the original clustering, whereas coding-rate chunking preserves it.
Figure 4: Case Study of Character-Level Coding Rate Scores . This figure illustrates how ByteFlow Net assigns an information-theoretic “importance" score to each character in an example sentence. The model has learned to assign a higher coding rate to characters that are more semantically significant, such as the initial letters of words and key entities. Conversely, it assigns lower rates to more predictable characters within words. This demonstrates the model’s ability to dynamically identify information-rich points in the byte stream to guide its chunking and resource allocation.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Model Family
Scale
Architecture
Layers
Hidden Dim
Heads
Tokenization
Chunking
Canon
Max Seq Len
Llama
600M
Standard Transformer
25
1024
16
TikToken
None
×
2048
1.3B
Standard Transformer
25
2048
16
TikToken
None
×
2048
LlamaByte
600M
Standard Transformer
25
1024
16
Byte-level
None
×
8192
1.3B
Standard Transformer
25
2048
16
Byte-level
None
×
8192
MambaByte
600M
Selective SSM
24
1024
N/A
Byte-level
None
×
8192
1.3B
Selective SSM
24
2048
N/A
Byte-level
None
×
8192
Appendix
Table 5: Comprehensive Model Architecture Specifications Across Six Model Families and Two Scales.
Model
Tokenizer
Accuracy ( ↑ )
HellaSwag
WinoGrande
BoolQ
PIQA
ARC-e
ARC-c
Average
600M Models Trained on 50B Tokens (1x Chincilla Ratio ( Hoffmann et al., 2022 ) )
LLaMA ( Dubey et al., 2024 )
BPE
43.12 ±0.87
42.74 ±1.92
62.26 ±0.64
59.43 ±1.25
61.38 ±0.98
25.95 ±1.76
49.15 ±0.73
Byte
LlamaByte ( Dubey et al., 2024 )
37.93 ±1.83
41.84 ±0.59
61.15 ±1.47
58.31 ±0.91
60.24 ±1.68
25.18 ±0.52
47.44 ±1.29
MambaByte ( Wang et al., 2024 )
38.21 ±0.76
41.97 ±1.95
61.48 ±1.14
58.67 ±0.68
60.53 ±1.87
25.42 ±1.03
47.71 ±0.85
Appendix
Table 6: Zero-shot performance comparison with ablation studies. Evaluation results on six downstream tasks at both 0.6B (50B tokens) and 1.3B (500B tokens) scales, including ablation studies for Canon layer and compression ratios. We report average scores over three separate runs to ensure fair comparison.
Tokenizer-free language models remove the inductive bias of fixed tokenizers by modeling text directly as bytes, but the resulting longer sequences substantially increase computation and eliminate explicit text abstractions. We ask whether this additional computation can be useful, and whether standard Transformers can learn the abstractions that tokenization provides. We study these questions on Transformers without specialized tokenization-related architectures. With token-superposition training and hash embeddings, byte Transformers consistently outperform subword Transformers as model size scales. We further find that byte Transformers build local text abstractions as external tokenizers: a set of segmentation-like positions are used to collect local context representations, and restricting up to 25% of intermediate layers to these local representations preserves downstream performance. Finally, these learned structures induce highly non-uniform generation difficulty, with uncertainty concentrated near local structure boundaries; exploiting them for speculative decoding yields 3.4× more accepted tokens than in subword Transformers.
Jie Wang, Shiwei Luo, Qi Zhang +1
School of Computer Science, East China Normal University, Shanghai, China · School of Computer Science, Fudan University, Shanghai, China
Tokenization is a central component of natural language processing in current large language models (LLMs), enabling models to convert raw text into processable units. Although learned tokenizers are widely adopted, they exhibit notable limitations, including their large, fixed vocabulary sizes and poor adaptability to new domains or languages. We present a family of models with up to 70 billion parameters based on the hierarchical autoregressive transformer (HAT) architecture. In HAT, an encoder transformer aggregates bytes into word embeddings and then feeds them to the backbone, a classical autoregressive transformer. The outputs of the backbone are then cross-attended by the decoder and converted back into bytes. We show that we can reuse available pre-trained models by converting the Llama 3.1 8B and 70B models into the HAT architecture: Llama-3.1-8B-TFree-HAT and Llama-3.1-70B-TFree-HAT are byte-level models whose encoder and decoder are trained from scratch, but where we adapt the pre-trained Llama backbone, i.e., the transformer blocks with the embedding matrix and head removed, to handle word embeddings instead of the original tokens. We also provide a 7B HAT model, Llama-TFree-HAT-Pretrained, trained entirely from scratch on nearly 4 trillion words. The HAT architecture improves text compression by reducing the number of required sequence positions and enhances robustness to intra-word variations, e.g., spelling differences. Through pre-training, as well as subsequent supervised fine-tuning and direct preference optimization in English and German, we show strong proficiency in both languages, improving on the original Llama 3.1 in most benchmarks. We release our models (including 200 pre-training checkpoints) on Hugging Face.
Subword tokenization hinders low-resource language processing by imposing frequency patterns from dominant languages onto script-sharing variants. Byte-level models bypass this issue by processing raw UTF-8 characters, yet they create a granularity mismatch for word-level tasks in non-Latin scripts. Hierarchical byte-level architectures address this mismatch by grouping bytes into word-aligned chunks. However, these architectures require massive training data and suffer from representational misalignment when paired with frozen subword-based language models. In this paper, we propose an adapted hierarchical network framework that bridges this modality gap without extensive training. Our method initializes byte embeddings directly from the subword representations of a frozen base model. We apply a chunk alignment loss to project dynamically grouped byte chunks toward precomputed subword targets, and interleave lightweight part-of-speech (POS) supervision to guide boundary detection. Experiments across six languages demonstrate that our tokenizer-free approach improves performance for word-level morphological tasks, yielding up to a 13.3% improvement on POS tagging.
Sanjeev Kumar, Atsuki Yamaguchi, Nikolaos Aletras
Department of Computer Science and Engineering, IIT Bombay, India · School of Computer Science, University of Sheffield, United Kingdom