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

TL;DR
Charformer introduces an end-to-end trainable model with a gradient-based subword tokenization module, enabling faster and more adaptable NLP models that operate directly on characters or bytes, outperforming traditional subword methods.
Contribution
The paper presents GBST, a novel differentiable subword tokenization method integrated into a Transformer, allowing end-to-end training and improved speed and flexibility over existing models.
Findings
Charformer outperforms byte-level baselines on multiple NLP tasks.
It improves Transformer speed by 28%-100%.
Maintains competitive accuracy with subword-based models.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Speech Recognition and Synthesis
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Absolute Position Encodings · Position-Wise Feed-Forward Layer · Charformer · Gradient-based Subword Tokenization Module · GBST · Byte Pair Encoding · Adam
