Abstract:Adapting language models to new data distributions by simple finetuning is challenging. This is due to the rigidity of their subword tokenizers, which typically remain unchanged during adaptation. This inflexibility often leads to inefficient tokenization, causing overfragmentation of text in out-of-distribution domains, unseen languages, or scripts. In this work, we develop byte-level LMs with learnable tokenizers to make tokenization adaptive. Our models include a submodule that learns to predict boundaries given the input byte sequence, encoding it into variable-length segments. Most tokenizer-free methods train this boundary predictor using an auxiliary loss that enforces a fixed compression rate across the training corpus, introducing a new kind of rigidity. We propose FLEXITOKENS, a simplified training objective that enables significantly greater flexibility during adaptation. Evaluating across multiple multilingual benchmarks, morphologically diverse tasks, and domains, we demonstrate that FLEXITOKENS consistently reduces token over-fragmentation and achieves up to 10% point improvements on token classification and generative tasks compared to BPE and other gradient-based tokenizer baselines. We validate our findings using models of varying sizes, and our method demonstrates consistent improvements across scales. Code and data for our experiments will be released at this https URL
| Comments: | Accepted to ACL (findings) 2026 |
| Subjects: | Computation and Language (cs.CL) |
| Cite as: | arXiv:2507.12720 [cs.CL] |
| (or arXiv:2507.12720v4 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2507.12720 arXiv-issued DOI via DataCite |
Submission history
From: Abraham Toluwase Owodunni [view email]
[v1]
Thu, 17 Jul 2025 01:55:41 UTC (4,293 KB)
[v2]
Wed, 23 Jul 2025 18:40:42 UTC (4,284 KB)
[v3]
Wed, 8 Oct 2025 18:22:21 UTC (4,284 KB)
[v4]
Wed, 13 May 2026 15:04:08 UTC (3,606 KB)
