Modern input methods routinely rely on autocomplete to omit information that can be recovered from local context. Inspired by these autocomplete-assisted writing systems, we investigate whether Transformer inputs can be compressed in a similar manner. Byte-level tokenization offers a simple and language-independent alternative to subword tokenization, but its longer input sequences typically result in increased computational cost and reduced model quality. We propose a compression scheme that employs a lightweight autoregressive byte language model to identify and remove bytes that are easily predictable from their surrounding context before Transformer processing. The resulting compressed representation is then provided as input to a standard encoder--decoder Transformer. Experiments on machine translation show that a substantial fraction of source-language bytes can be omitted without degrading translation quality. On English--French, our best method preserves translation performance while reducing source sequence length by nearly one-third. Additional experiments on Finnish--English, Russian--English, and Chinese--English demonstrate that the approach generalizes across diverse writing systems and morphological typologies, yielding comparable or improved translation quality at compression ratios between 0.47 and 0.67. These findings suggest that many input bytes are predictable enough to be represented implicitly rather than explicitly, providing a simple mechanism for reducing the sequence-length overhead associated with byte-level models.
Figures & tables
Figure 1: One variant (“length-encoded sentinel”) of our proposed technique. The original byte sequence is provided as input to an autocomplete model, which auto-regressively predicts the next byte given the previous bytes. Then, byte sequences that were confidently predicted by the autocomplete model are removed. Sentinels are (possibly) inserted to indicate where bytes were removed. Finally, the compressed sequence is ingested by a Transformer.
Figure 2: Application of the four compression schemes to the segment “these green apples.” From upper left (clockwise): Length-Encoded Sentinel, Explicit Sentinel, Implicit Sentinel, Sentinel-Free.
Compression
Threshold
Compression
chrF
BLEU
Scheme
type
value ( α )
Ratio
Sentinel-Free
Absolute
0.7
0.563
57.1
29.6
Relative
0.5
0.553
56.8
29.2
Relative
0.3
0.500
54.0
26.5
Absolute
0.5
0.486
53.1
25.9
Relative
0.1
0.436
48.6
21.5
Table 1: Translation quality as a function of compression scheme and threshold. Compression ratio is defined as compressed length divided by original length.
Figure 3: Translation quality versus compression ratio for the four compression schemes. Compression ratio is defined as compressed length divided by original length. This plot also includes three baselines: the Byte baseline is uncompressed byte tokenization. The No Vowels baseline removes all vowels from the input sentences. The First Three baseline preserves only the first three letters of each word.
Figure 4: Translation quality versus compression ratio for the four compression schemes, with absolute and relative prediction thresholds isolated. There is no clear advantage to absolute or relative prediction thresholds.
Language Pair
Compression Scheme
Compression Ratio
chrF
BLEU
fi-en
Byte
1.0
51.1
22.1
fi-en
Implicit Sentinel (abs, α=0.8 )
0.646
51.2
22.1
ru-en
Byte
1.0
47.1
21.4
ru-en
Implicit Sentinel (abs, α=0.8 )
0.468
54.9
28.3
zh-en
Byte
1.0
45.3
17.3
zh-en
Implicit Sentinel (abs, α=0.8 )
0.668
47.9
18.9
Table 2: Translation quality and compression ratio for three WMT19 language pairs. Compression ratio is defined as compressed length divided by original length.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Composition of source-language byte streams and omission behavior of the compression step. Each bar represents all source bytes in the test set for a language. Colors indicate byte categories, while hatched regions denote bytes omitted by the autocomplete model. Russian and Chinese contain a substantially larger proportion of UTF-8 lead and continuation bytes than Finnish, and a considerable fraction of these bytes are removed during compression.
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
Transformer language models process sequences token by token in an autoregressive manner, making growing contexts increasingly expensive. Yet many adjacent token spans are highly predictable or frequently occur as stable units, suggesting that their representations may be compressible. We introduce a method for distilling sequential computation by replacing spans of input tokens with collapsed representations, computed on the fly by a lightweight merge module. This module generates a single surrogate embedding from a sequence of static token embeddings that captures the functional role of the multiple tokens, allowing pretrained models to operate on compressed inputs without architectural changes or re-training. We apply this approach during inference to compress both prompts and intermediate decoding steps, using a rollback mechanism to substitute stored multi-token KV cache entries with their single-step surrogates. Experiments across diverse models show that the merge module can be used to reduce effective sequence length by up to 40% with minimal accuracy degradation across language modeling evaluations and downstream tasks, including question answering, summarization, commonsense reasoning, and long-form mathematical reasoning. Additional lightweight adaptation of the merge module further improves the accuracy-compression trade-off in selected settings. These results demonstrate that sequential token computation in Transformers can be effectively approximated through condensed surrogate representations that approximate the original behavior without model updating.
Zixuan Lan, Jessica Yang, Yanhong Li +2
The University of Chicago · Toyota Technological Institute at Chicago · Independent Researcher +1
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.
Chunyuan Deng, Sanket Lokegaonkar, Colin Lockard +3