# Charformer: Fast Character Transformers via Gradient-based Subword Tokenization

- **ID:** 569
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2106.12672
- **Authors:** Yi Tay, Vinh Q. Tran, Sebastian Ruder, Jai Gupta, Hyung Won Chung, Dara Bahri, Zhen Qin, Simon Baumgartner, Cong Yu, Donald Metzler
- **Venue:** arXiv / Google Research / DeepMind
- **Published:** 2021
- **Tags:** charformer, gbst, byte-level, tokenization, iclr, google, deepmind, byt5, canine
- **Topics:** tokenization, character-level Transformers, byte-level LMs
- **Added:** 2026-10-01
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/569

## Summary

GBST scores candidate byte n-gram blocks (max width 4) position-wise and mixes them, then mean-pools (ds=2–3). Charformer is a T5-style encoder-decoder on the 256-byte vocab. CharformerSBase (134M, deep encoder): English GLUE avg 83.6 vs T5-Base 84.3 / Byte-T5 81.5; Civil Comments 83.0 vs T5 81.2; IMDb 94.4 vs T5 94.2. Multilingual long-PT: TyDiQA-GoldP 81.2/71.3 vs mT5-Base 80.8/70.0, 28% faster with ~3× fewer params. ICLR 2022 camera-ready. Implementation https://github.com/google-research/google-research/tree/master/charformer.

## Attributes

- **Purpose:** Learn latent subword blocks from bytes with a differentiable GBST module instead of a frozen tokenizer
- **Scale:** C4 1M steps seq 1024; GLUE/IMDb/AGNews/Civil Comments/Wiki Comments; mC4 101 langs; TyDiQA/XQuAD/MLQA/XNLI/PAWS-X; ds=2–3, max block 4
- **Time period:** 2021-06-23 (arXiv 2106.12672 v1); last revised 2022-02-23 (v3). ICLR 2022 camera-ready. HF paper publishedAt 2021-06-23.

## From the source (fetched 2026-10-03)

- **Published:** Jun 23, 2021 (arXiv)
- **Last revised:** Feb 23, 2022 (arXiv)
- **arXiv categories:** cs.CL, cs.AI, cs.LG (arXiv)
- **Author comment:** ICLR 2022 Camera Ready (arXiv)
- **Citations:** 221 (20 influential) (Semantic Scholar)
- **References:** 70 (Semantic Scholar)
- **Published in:** International Conference on Learning Representations (Semantic Scholar)

## 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.

## Research notes

- Primary: arxiv abs (cs.CL; also cs.AI, cs.LG). License: arXiv.org perpetual non-exclusive on HTML at check. Comment: ICLR 2022 Camera Ready. Equal contrib Tay/Tran. Google Research / DeepMind. Correspondence yitay@google.com, vqtran@google.com. Implementation in google-research/google-research/charformer (monorepo; no standalone official repo on abs). HF paper page 0 upvotes; unofficial linked models orkungedik/charformer-turkish-base and etri-lirs/gbst-kebyt5-* not copied into hf_* fields. Discord posted abs v3. Trains on C4/mC4/GLUE rather than a new hosted corpus, so no datasets_local row. License field left blank per catalog convention.

## Cited by, within this collection

- [SuperBPE: Space Travel for Language Models](https://papers.projxon.ai/entries/559) (paper 2025, #559)
- [T-FREE: Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings](https://papers.projxon.ai/entries/582) (paper 2024, #582)

## Similar entries

- [Decoupling the Benefits of Subword Tokenization for Language Model Training via Byte-level Simulation](https://papers.projxon.ai/entries/519) (paper, #519)
- [Byte Latent Transformer: Patches Scale Better Than Tokens](https://papers.projxon.ai/entries/554) (paper, #554)
- [EvaByte: Efficient Byte-level Language Models at Scale](https://papers.projxon.ai/entries/1098) (post, #1098)
- [ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators](https://papers.projxon.ai/entries/584) (paper, #584)
- [Agentic RL: Token-In, Token-Out Done Right (TITO)](https://papers.projxon.ai/entries/978) (post, #978)
- [Combinatorial BPE Tokenizer (factored variation/prefix/core/suffix embeddings)](https://papers.projxon.ai/entries/1054) (code, #1054)
