Papers › ByT5: Towards a token-free future with pre-trained byte-to-byte models

ByT5: Towards a token-free future with pre-trained byte-to-byte models

28 May 2021arXiv:2105.13626archive 2025-07-28

Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, Colin Raffel

Most widely-used pre-trained language models operate on sequences of tokens corresponding to word or subword units. By comparison, token-free models that operate directly on raw text (bytes or characters) have many benefits: they can process text in any language out of the box, they are more robust to noise, and they minimize technical debt by removing complex and error-prone text preprocessing pipelines. Since byte or character sequences are longer than token sequences, past work on token-free models has often introduced new model architectures designed to amortize the cost of operating directly on raw text. In this paper, we show that a standard Transformer architecture can be used with minimal modifications to process byte sequences. We characterize the trade-offs in terms of parameter count, training FLOPs, and inference speed, and show that byte-level models are competitive with their token-level counterparts. We also demonstrate that byte-level models are significantly more robust to noise and perform better on tasks that are sensitive to spelling and pronunciation. As part of our contribution, we release a new set of pre-trained byte-level Transformer models based on the T5 architecture, as well as all code and data used in our experiments.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2105.13626")

Code

Syntology Ran 0 of 6 code samples harvested from 2 repositories linked to this paper; 6 have no recorded run.

By repository: official repository: 4 samples from 1 repository, 0 ran; community (archive-listed): 2 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

google-research/byt5 officialmentioned in papermentioned on GitHubtfApache-2.0 report
ufal/multilexnorm2021 mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

6 samples harvested; 0 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6unverified

Licence: 0 of the 6 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

bleu1 google-research/byt5/byt5/metrics.py official repository unverified Apache-2.0 (permissive) · fa96fb90180ccd08 · report
cer google-research/byt5/byt5/metrics.py official repository unverified Apache-2.0 (permissive) · 31d155ca87421398 · report
get_perc_99_len google-research/byt5/byt5/get_length_stats.py official repository unverified Apache-2.0 (permissive) · d47efbd10d362210 · report
metrics_task1_2020 google-research/byt5/byt5/sigmorphon.py official repository unverified Apache-2.0 (permissive) · cc3b1f39907cd5aa · report
load_vocabulary yoreG123/Paddle-ByT5/byt5/paddlenlp/experimental/model_utils.py community (archive-listed) unverified MIT (permissive) · 7667c4274e1b357d · report
sequence_mask yoreG123/Paddle-ByT5/byt5/paddlenlp/layers/sequence.py community (archive-listed) unverified MIT (permissive) · c5e1f47618c8fdaa · report

Tasks

Cross-Lingual NERCross-Lingual Natural Language InferenceCross-Lingual Paraphrase IdentificationCross-Lingual Question AnsweringExtreme SummarizationQuestion Answering

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Cross-Lingual NER WikiAnn NER ByT5 XXL F1 67.7 #1 of 1 Archive leaderboard report
Cross-Lingual Natural Language Inference XNLI ByT5 XXL Accuracy 83.7 #1 of 5 Archive leaderboard report
Cross-Lingual Natural Language Inference XNLI ByT5 Small Accuracy 69.1 #4 of 5 Archive leaderboard report
Cross-Lingual Question Answering MLQA ByT5 XXL EM 54.9 #1 of 3 Archive leaderboard report
Cross-Lingual Question Answering MLQA ByT5 XXL F1 71.6 #1 of 3 Archive leaderboard report
Cross-Lingual Question Answering TyDiQA-GoldP ByT5 (fine-tuned) EM 81.9 #1 of 11 Archive leaderboard report
Cross-Lingual Question Answering TyDiQA-GoldP ByT5 XXL EM 60.0 #5 of 11 Archive leaderboard report
Cross-Lingual Question Answering TyDiQA-GoldP ByT5 XXL F1 75.3 #5 of 11 Archive leaderboard report
Cross-Lingual Question Answering XQuAD ByT5 XXL EM 63.6 #1 of 4 Archive leaderboard report
Cross-Lingual Question Answering XQuAD ByT5 XXL F1 79.7 #1 of 4 Archive leaderboard report
Extreme Summarization GEM-XSum ByT5 BLEU score 15.3 #5 of 6 Archive leaderboard report
Extreme Summarization GEM-XSum mT5 BLEU score 14.3 #6 of 6 Archive leaderboard report
Question Answering TweetQA ByT5 (small) BLEU-1 72.0 #1 of 3 Archive leaderboard report
Question Answering TweetQA mT5 BLEU-1 70.8 #2 of 3 Archive leaderboard report
Question Answering TweetQA mT5 ROUGE-L 74.3 #2 of 3 Archive leaderboard report
Question Answering TweetQA ByT5 ROUGE-L 75.7 #3 of 3 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdafactorAdamAttentionAttention DropoutBPEDense ConnectionsDropoutGated Linear UnitInverse Square Root ScheduleLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSentencePieceSoftmaxT5Transformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections