HackerPapers

arXiv:2106.12672cs.CL

Charformer: Fast Character Transformers via Gradient-based Subword Tokenization

Yi Tay, Vinh Q. Tran, Sebastian Ruder, Jai Gupta, Hyung Won Chung, Dara Bahri, Zhen Qin, Simon Baumgartner, Cong Yu, Donald Metzler

Abstract

State-of-the-art models in natural language processing rely on separate rigid subword tokenization algorithms, which limit their generalization ability and adaptation to new settings. In this paper, we propose a new model inductive bias that learns a subword tokenization end-to-end as part of the model. To this end, we introduce a soft gradient-based subword tokenization module (GBST) that automatically learns latent subword representations from characters in a data-driven fashion. Concretely, GBST enumerates candidate subword blocks and learns to score them in a position-wise fashion using a block scoring network. We additionally introduce Charformer, a deep Transformer model that integrates GBST and operates on the byte level. Via extensive experiments on English GLUE, multilingual, and noisy text datasets, we show that Charformer outperforms a series of competitive byte-level baselines while generally performing on par and sometimes outperforming subword-based models. Additionally, Charformer is fast, improving the speed of both vanilla byte-level and subword-level Transformers by 28%-100% while maintaining competitive quality. We believe this work paves the way for highly performant token-free models that are trained completely end-to-end.

arXiv comments
ICLR 2022 Camera Ready
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Sep 2024 to Oct 2026. Found in 1 HN submission from Jun 2021 to Jun 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • There has been extensive research into token-free LLMs, but for some reason we are still operating in a token domain, so there is something to that. Byte Latent Transformers (BLT): https://arxiv.org/abs/2412.09871 Charformer: https://arxiv.org/abs/2106.12672

      armcatView on HNParent context

    • Solving the strawberry problem will probably require a model that just works with bytes of text. There have been a few attempts at building this [1] but it just does not work as well as models that consume pre-tokenized strings. [1]: https://arxiv.org/abs/2106.12672

      karterkView on HNParent context

Submitted to Hacker News

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