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

Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang +3 more
5/28/2021
cs.CL

Official code: google-research/byt5 (548 stars, Apache-2.0, last commit 2024-02-13).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
54835PythonMay 26, 20212 years agoApache-2.0

Cite this paper

@article{xue2021byt,
  title  = {ByT5: Towards a token-free future with pre-trained byte-to-byte models},
  author = {Linting Xue and Aditya Barua and Noah Constant and Rami Al-Rfou and Sharan Narang and Mihir Kale and Adam Roberts and Colin Raffel},
  year   = {2021},
  eprint = {2105.13626},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.13626}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2105.13626.svg)](https://codeofpaper.com/paper/2105.13626)

Discussion