HackerPapers

arXiv:2105.13626cs.CL

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

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

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.

arXiv comments
To be published in TACL 2022
Journal reference
DOI
Subjects
cs.CLComputation and Language

On Hacker News

Linked by 6 identifiable commenters in 8 comments across 8 threads, from May 2022 to Jun 2026.

Comments linking this paper, per year.

Discussed in comments8 threads

    • There are many approaches around this, the simplest being to treat bytes as tokens (cf: Google's ByT5[1]). Also, BLT[2] from Meta and ByteFormer[3] from Apple. [1]: https://arxiv.org/abs/2105.13626 [2]: https://arxiv.org/abs/2412.09871 [3]: https://arxiv.org/abs/2306.00238

      woadwarrior01View on HNParent context

    • > GPT-3 was terrible at jokes. Many LLMs are because it's hard to model puns in a stochastic parrot GPT-3 was great at jokes. The Navy Seals were hilarious (https://gwern.net/gpt-3#navy-seals). And the difficulty of modeling puns has nothing to do with 'stochastic parrots' and…

      gwernView on HNParent context

  1. Understanding GPT tokenizers 1 comment
    • Yes, "ByT5: Towards a token-free future with pre-trained byte-to-byte models" for example. https://arxiv.org/abs/2105.13626

      sanxiynView on HNParent context

  2. A Baby GPT 1 comment
    • > LLMs work on tokens, which, for the most part, are words (longer words are generally split up into multiple tokens). Although this is mostly true, there are exceptions to the rule. Look at the ByT5 family[1] of models for instance. These models operate on byte level…

      woadwarrior01View on HNParent context

    • This is a common myth, which I've written about before. https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... The closest anyone's come to proving that byte-level tokenization is better is the ByT5 paper https://arxiv.org/abs/2105.13626 But they only showed evidence…

      sillysaurusxView on HNParent context

    • The ByT5 paper shows significantly better resiliency to typos and noise in internet scale benchmarks, as well as better reasoning capabilities with tasks like punctuation and spacing correction: https://arxiv.org/pdf/2105.13626.pdf The analogy doesn’t hold because while you…

      yunyuView on HNParent context

    • > The alternatives are learning at the character level (way more complex No, BPEs are more complex: you have a whole additional layer of preprocessing, with all sorts of strange and counterintuitive downstream effects and brand new ways to screw up (fun quiz question: everyone…

      gwernView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.