Skip to content

What Language is This? Ask Your Tokenizer

Feb 2026 · arXiv.org · Vol abs/2602.17655 · 2 citations · 40 references
Computer Science

TL;DR

UniLID, a simple and efficient LID method based on the UnigramLM tokenization algorithm, is introduced, which supports incremental addition of new languages without retraining existing models, and can naturally be integrated into existing language model tokenization pipelines.

Abstract

Language Identification (LID) is an important component of many multilingual natural language processing pipelines, where it facilitates corpus curation, training data analysis, and cross-lingual evaluation of large language models. Despite near-perfect performance on high-resource languages, existing systems remain brittle in low-resource and closely related language settings. We introduce UniLID, a simple and efficient LID method based on the UnigramLM tokenization algorithm. In short, to predict a string's language label, we simply ask: under which language's unigram distribution is this string most likely? Our formulation is data- and compute-efficient, supports incremental addition of new languages without retraining existing models, and can naturally be integrated into existing language model tokenization pipelines. Empirical evaluations against widely used baselines, including fasttext, GlotLID-M, and CLD3, show that UniLID achieves competitive performance on standard benchmarks, reaches 69% accuracy with five labeled samples per language and 89% with 25, and delivers large gains on fine-grained dialect identification.

View source

Similar papers

#machine learning Preprint Nov 2026

MoTo: Mixture of Tokenizers Towards Fair Multilingual Language Modeling

Large language models rely on a single tokenizer that is chosen at training time and fixed thereafter. Most tokenizers are trained on English-dominant corpora, making them under-serve morphologically rich and non-Latin-script languages, where they can produce fragmented representations, longer sequence lengths, and red...

G. Altintas, Colin A. Raffel · 0 citations
#natural language process... Open access Sep 2026

To Each Language Its Tokenizer: Modular Tokenizers for Efficient Multilingual LLMs

Multilingual Large Language Models (LLMs) traditionally rely on a single vocabulary shared by all supported languages, which can lead to uneven compression across them. Moreover, their large embedding and output matrices increase memory usage and slow inference, notably for small-scale models. It is also wasteful as mo...

Franck Signe Talla, Hippolyte Pilchen, François Yvon et al. · 0 citations
Open access 2026

Representation Learning Enables Language Identification in Zero - and Few -Shot Settings

Language Identification (LID) is a key component of multilingual NLP pipelines and multilingual corpus construction. LID errors can create spurious text–language associations, harming downstream model quality, especially for low-resource languages and fine-grained taxonomies involving closely related languages and di...

Rocco Tripodi · 0 citations
#natural language process... Open access Oct 2026

No Single Tokenizer Feature Reliably Predicts Downstream Language Model Performance

Tokenization is a critical component of the language modeling pipeline, but it is poorly understood. Tokenizers can impact downstream performance, but there is currently mixed evidence about which tokenizer features predict a better language model without requiring a full training run. In this paper, we analyze approxi...

Antonio Lopardo, Luis Frentzen Salim, Shikhar Srivastava et al. · 0 citations
#natural language process... Open access Sep 2026

RunyaNER: Auxiliary Language Selection for Runyankore NER

This work introduces RunyaNER, the first publicly available NER benchmark for the East African language Runyankore, and uses it to investigate the choice of which languages to use for transfer and provides a systematic analysis of auxiliary language selection strategies.

Prosper Arineitwe Asiimwe, Francois Meyer, Jan Buys · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 23, 2026

Many languages, one common neural code

Analyzing speakers of 21 languages, an MIT study using multilingual AI finds the human brain may represent meaning in much the same way.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.