Gali0.6 preview · draft

Lexical banks for 280 languages from open text

A production example, Gali 0.6 preview. Elamur, 20 November 2026. Draft, open to edits until Mova 0.6 is released.

The task

Half of Gali's 16 384 token ids belong to the language in use (the vocabulary paper). Each language needs its own bank: 256 byte ids, so any text can be written, and 7 936 n-grams of words, fitted on the language's own text. A bank must give back every character it was given. Many of the languages are small: their only large open text is a Wikipedia, and in many Wikipedias most articles were made by bots.

The pipeline

  1. Open text only: Wikipedia and Wikisource prose under CC BY-SA, rendered to plain paragraphs; nothing written by an AI model.
  2. Bot-made stubs left out by a fixed rule over article templates. Their share can be large: 66 % of the Serbo-Croatian articles, 72 % of the Malagasy, 78 % of the Venetian.
  3. 4000 articles a language, chosen by a hash of their identifiers, so the choice does not depend on dump order; 2 % of them held out.
  4. The bank fitted on 1500 of the training articles: characters seen at least twice, then word n-grams by count.
  5. Every paragraph encoded and decoded again, and compared with the original.

The language graph decides who gets a bank

A dialect reads with its standard's bank, so that a word shared with the standard has the same token: Bosnian in Latin script reads with Croatian's bank, Nynorsk with Norwegian's, Alemannic, Bavarian and Low German with German's, Egyptian and Moroccan Arabic with Arabic's. A continuum has one bank for all its varieties, as the Gallo-Italic one does for Lombard, Piedmontese, Emilian and Ligurian. A language written in another script than its parent gets its own bank: Cantonese and Classical Chinese in traditional characters, Min Nan in Latin letters. A variety whose parents are equal, as Ruthenian's are (Ukrainian, Belarusian and Church Slavonic), inherits none and gets a bank of its own.

Results

Coverage264 banks for the Wikipedias of 74 main and 206 small languages, 25 Wikisources, Ruthenian and Lojban — about 830 million tokens of text in the 16k layout (8 192 lexical ids a bank)
Lossless0 paragraphs out of hundreds of thousands differed after encoding and decoding, in every language
Density2.1 to 2.5 characters a token for alphabets; Chinese characters 0.9 to 1.1; byte fallback 0.1 % in a median language
Shared banks cost densityAlemannic 1.83 and Low German 1.89 characters a token on German's bank, where German has about 2.3

Lessons

A bank is a fixed subword vocabulary of the kind BPE (Sennrich et al. 2016) and SentencePiece (Kudo and Richardson 2018) learn, one per language instead of one for all, with a byte fallback in the spirit of ByT5 (Xue et al. 2022). The parallel texts that come next are human pairs aligned by length (Gale and Church 1993), and mined pairs (WikiMatrix, Schwenk et al. 2021; NLLB Team 2022) used only to align the encoder; FLORES (Goyal et al. 2022; NLLB Team 2022) is kept as a test.

References

This page in Markdown https://md.gali.elamur.ai/free/en/0.6/practice/language-banks/