Research paper · 2026-10-10

Token counts across Indian languages

Five tokenizers, six languages and 300 aligned rows show a wide spread in token counts.

Team 23N Labs

Working paper

Team 23N Labs · Working paper · Full technical report

Hindi to English token ratios across five tokenizers300 aligned rows. Five tokenizers.Ratio of mean Hindi to English tokensGPT-27.43mBERT1.76XLM-R1.25Qwen2.54.44UMT51.47
Hindi to English token ratios on 300 aligned FLORES rows.

How much space does the same translated sentence take?

What we found: Token counts depend strongly on the tokenizer. The paired sample shows a wide spread, even among openly available choices.

Actual mBERT token pieces from one aligned English and Hindi rowmBERT: actual pieces of one aligned rowEnglish: 35 tokensLikesomeotherexperts,First five complete pieces; total uses the full row.Hindi: 80 tokensकुछअन्यविशेष##ज्ञ##ोंFirst five complete pieces; total uses the full row.
A separate mBERT illustration: first five actual pieces from one aligned row; it does not explain GPT-2’s aggregate ratio.

1. On average, GPT-2 used 7.43 times as many tokens for Hindi as English on these paired sentences.

GPT-2 English and Hindi mean token counts and ratioGPT-2 mean tokens per sentenceEnglish27.01Hindi200.58Hindi / English: 7.43×Paired 95%: 7.26–7.59
Means and paired interval come from the same 300 aligned rows.
def claim_1(r):
    """GPT-2 Hindi/English token ratio exceeds seven on the paired sample."""
    ci=r['stats']['GPT-2']['Hindi']['ratio_ci95']
    ok=ci[0]>7.0
    return ok,f"GPT-2 Hindi/English {r['stats']['GPT-2']['Hindi']['ratio_to_english']:.2f}x; 95% CI {ci[0]:.2f}–{ci[1]:.2f}; lower bound > 7.0"
GPT-2 Hindi/English 7.43x; 95% CI 7.26–7.59; lower bound > 7.0
PASS

2. Every tested tokenizer averaged more tokens for Hindi than English on these paired sentences.

All five tokenizers Hindi to English ratios and intervalsHindi / English: ratio of meansGPT-27.43paired 95%: 7.26–7.59mBERT1.76paired 95%: 1.73–1.79XLM-R1.25paired 95%: 1.23–1.27Qwen2.54.44paired 95%: 4.34–4.54UMT51.47paired 95%: 1.45–1.50English baseline: 1×
Bars show ratios of mean token counts with paired 95% intervals. mBERT emitted 86 Hindi and 9 English unknown tokens.
def claim_2(r):
    """All five tokenizers use more Hindi than English tokens."""
    ratios=[r['stats'][m]['Hindi']['ratio_ci95'][0] for m in r['model_order']]
    ok=all(x>1.0 for x in ratios)
    return ok,f"{sum(x>1 for x in ratios)}/5 lower 95% bounds > 1.0; minimum {min(ratios):.2f}"
5/5 lower 95% bounds > 1.0; minimum 1.23
PASS

3. GPT-2 averaged over seven times as many tokens for each of the five Indian languages as for English.

GPT-2 token ratios with intervals for five Indian languagesGPT-2: ratio of means vs EnglishHindi7.43paired 95%: 7.26–7.59Bengali9.58paired 95%: 9.38–9.78Tamil15.58paired 95%: 15.23–15.92Telugu12.84paired 95%: 12.55–13.12Marathi7.72paired 95%: 7.56–7.87Claim threshold: >7× English mean
Five selected Indian languages, each compared with the same English rows.
def claim_3(r):
    """GPT-2 uses over seven times English tokens for each selected Indian language."""
    vals=[r['stats']['GPT-2'][l]['ratio_ci95'][0] for l in r['language_codes'] if l!='English']
    ok=all(x>7.0 for x in vals)
    return ok,f"{sum(x>7 for x in vals)}/5 lower 95% bounds > 7.0; minimum {min(vals):.2f}"
5/5 lower 95% bounds > 7.0; minimum 7.26
PASS

4. XLM-R averaged fewer Hindi tokens per sentence than UMT5 on this sample.

XLM-R versus UMT5 Hindi token countsHindi tokens per sentenceXLM-R38.16UMT542.93
Mean Hindi token count across the same 300 aligned rows.
def claim_4(r):
    """XLM-R uses fewer Hindi tokens per sentence than UMT5 here."""
    a=r['stats']['XLM-R']['Hindi']['tokens_per_sentence'];b=r['stats']['UMT5']['Hindi']['tokens_per_sentence']
    ok=a<b
    return ok,f"XLM-R {a:.2f} < UMT5 {b:.2f} Hindi tokens/sentence"
XLM-R 38.16 < UMT5 42.93 Hindi tokens/sentence
PASS

5. An illustrative 4096-token budget equals 20 average-length Hindi versus 151 English sentence equivalents using GPT-2 counts.

Illustrative context budget from mean sentence lengthsHypothetical 4096-token budgetfloor(4096 ÷ mean tokens/sentence)English151Hindi20
Hypothetical budget: floor of 4096 divided by the measured mean; no prompts or overhead, and no supported model context size is implied.
def claim_5(r):
    """A 4096-token illustrative budget holds under one fifth as many mean Hindi as English GPT-2 sentences."""
    a=r['stats']['GPT-2']['English']['context_4096_sentences'];b=r['stats']['GPT-2']['Hindi']['context_4096_sentences']
    ok=b/a<0.2
    return ok,f"floor(4096/mean): Hindi {b}, English {a}; {b/a:.3f} < 0.200"
floor(4096/mean): Hindi 20, English 151; 0.132 < 0.200
PASS

Limits: This is a replication on FLORES translations, not a model-quality, speed, price, or universal language claim. mBERT emitted 412 unknown tokens for Bengali; PASS checks numbers only.

Full technical report

Token counts across six FLORES-200 languages: a local replication

Team 23N Labs · Revision · Run 28-paper4-20261010-02

Token counts vary substantially across the five pinned tokenizer files. On 300 aligned FLORES-200 devtest rows, all 25 non-English/English ratios exceed one, with every reported bootstrap interval entirely above one. This is a narrower local replication; no originality is claimed. The source record identifies prior work on Indic tokenization and context consequences.

Scope and method. The direction considered all 1,012 devtest rows; the measured JSON covers 300, sampled without replacement using seed 28004 to keep the local multi-stage paper run bounded. Identical sorted row indices are used for English (eng_Latn), Hindi (hin_Deva), Bengali (ben_Beng), Tamil (tam_Taml), Telugu (tel_Telu), and Marathi (mar_Deva). Findings describe this sample of aligned FLORES-200 sentences, not all 1,012 rows.

The measurement code loads local tokenizer JSON files, checks asset SHA-256 hashes, asserts 1,012 lines per language, and encodes with add_special_tokens=False. Padding and truncation are disabled. GPT-2 and Qwen2.5 use byte BPE, mBERT uses WordPiece, and XLM-R and UMT5 use SentencePiece Unigram.

Mean tokens per sentence are arithmetic means. Language/English ratios divide aggregate token counts, rather than averaging sentence-level ratios. Tokens per character divide aggregate tokens by Python string lengths, including spaces and punctuation; these are Unicode code-point counts, not grapheme counts. Summary values are rounded to four decimal places.

For each ratio, 2,000 bootstrap resamples draw 300 aligned rows with replacement, preserving language–English pairing. Seeds are 28004 + 100 × language_index + tokenizer_index, using the recorded ordering. Sorted ratios at zero-based indices 49 and 1949 supply the reported 95% endpoints.

Measured findings. Values below reproduce the JSON’s stored precision. The complete measured table supplies all 30 means, intervals, character rates, budget values, and unknown-token counts.

TokenizerHindi / EnglishBengali / EnglishTamil / EnglishTelugu / EnglishMarathi / English
GPT-27.42699.578115.575512.83837.7183
mBERT1.76141.88222.11712.09571.9361
XLM-R1.24861.39071.35111.30071.1984
Qwen2.54.44415.06776.16216.97444.5579
UMT51.47491.67551.69392.33241.6045

XLM-R has the lowest mean count and English-relative ratio for each sampled Indic language among these five assets. The smallest ratio is XLM-R Marathi, 1.1984, with interval 1.1778–1.2185; the largest is GPT-2 Tamil, 15.5755, with interval 15.2287–15.9183. Cross-tokenizer rankings are descriptive: no paired intervals for differences between tokenizers were calculated.

Unknown-token substitution qualifies these comparisons. Unknown IDs are derived from the pinned tokenizer assets and counted in encoded ID arrays. mBERT records 9 English, 86 Hindi, 412 Bengali, 4 Tamil, 37 Telugu, and 0 Marathi unknown tokens across the sampled sentences. An unknown token can replace multiple characters, reducing counts while losing distinctions in the input. Consequently, smaller counts do not necessarily indicate better text representation. The other four tokenizers record zero unknown IDs for all six languages.

GPT-2 Hindi averages 200.5767 tokens per sentence versus 27.0067 for English: ratio 7.4269, interval 7.2617–7.5918. As a matching-tokenizer illustration, the JSON’s first sampled row, zero-based index 2, contains 308 Hindi versus 31 English GPT-2 tokens. This individual example does not estimate the aggregate ratio.

Hypothetical token budget and claim checks. The budget calculation is floor(4096 / unrounded_mean_tokens_per_sentence). GPT-2 gives 20 Hindi versus 151 English average-length sentence equivalents, with 20/151 ≈ 0.132. This is a mean-based illustration, not actual sentence packing or evidence that any associated model supports a 4,096-token context. It excludes prompts and special-token overhead.

The saved check table records five passes against the thresholds in claim-check code:

CheckRecorded evidenceOutcome
GPT-2 Hindi lower interval bound > 77.2617PASS
All five Hindi lower bounds > 1Minimum 1.2280PASS
All five GPT-2 Indic lower bounds > 7Minimum 7.2617PASS
XLM-R Hindi mean < UMT5 Hindi mean38.1567 < 42.9333PASS
GPT-2 Hindi/English budget-equivalent quotient < 0.220/151 ≈ 0.132PASS

PASS means the specified numerical threshold passed. It does not certify model quality, provenance, generalization, or publication readiness.

Provenance and execution record. The asset manifest records filenames, byte sizes, SHA-256 hashes, repository identities, licenses, and pinned URLs. All six dataset files use DGME/FLORES-200 revision 3cb4c84a41f461a82cb8ad61903590a7351c2ec8.

Tokenizer repositoryPinned revisionRecorded license
openai-community/gpt2607a30d783dfa663caf39e06633721c8d4cfcd7eMIT
google-bert/bert-base-multilingual-cased3f076fdb1ab68d5b2880cb87a0886f315b8146f8Apache-2.0
FacebookAI/xlm-roberta-basee73636d4f797dec63c3081bb6ed5c7b0bb3f2089MIT
Qwen/Qwen2.5-0.5B-Instruct7ae557604adf67be50417f59c2c2f167def9a775Apache-2.0
google/umt5-small8c63c2b77efbf8e41206a2c8d994846cc9392360Apache-2.0

The JSON’s eleven asset hashes match the supplied manifest. The local fetch_paper4.py run verified downloaded byte sizes and SHA-256 hashes, and the final paper4_checks.py run checked them again before re-encoding every sampled sentence. The committed check-run metadata binds the five saved outcomes to SHA-256 digests of the results, checks, measurement/check code and manifest, and records Python, platform and Tokenizers versions.

The hardware record reports an Intel Core i7, four physical cores at 2.3 GHz, 32 GB RAM, and x86_64 macOS 26.5.2; it attributes the more specific i7-1068NG7 designation to the brief. Runtime metadata records Python 3.9.10 and Tokenizers 0.21.1. No GPU was used; no model inference or speed measurement was performed.

Execution command recorded for this run:

TOKENIZERS_PARALLELISM=false python3 paper4_team.py run --run-id 28-paper4-20261010-02

The structured run log records this command's fetch, measurement, checks, table, chart, and six separate bounded research-team stages under run 28-paper4-20261010-02, followed by logged revision stages. The measurement script's …-01 default was overridden by the command. The final phone capture and induced asset-integrity failure are recorded in phone evidence and failure evidence.

The assessment reported that raw-count arithmetic, seeded sampling, means, ratios, budget values, bootstrap endpoints, and saved claim outputs matched. This revision resolves the report’s omitted unknown-token caveat, run-identity ambiguity, inaccessible citation paths, unsupported news-domain wording, and unclear PASS interpretation. It adds manifest and hardware provenance and a GPT-2-specific example.

The claim-card post links to this report with the correct ../report.md path. Its GPT-2 claim uses GPT-2 means; a separate mBERT figure illustrates token pieces without claiming to explain GPT-2's aggregate ratio. Seven code-generated SVGs and the offline 390px screenshot are in post/.

Remaining limitations. Bootstrap intervals describe row-resampling variability only. They lack finite-population correction despite sampling 300/1,012 rows, do not account for possible document clustering, and have no simultaneous-comparison adjustment. They do not capture translation, domain, corpus, or tokenizer-version uncertainty. Token counts establish neither quality, latency, pricing, nor task performance.

The final validator run checked exact tokenizer and language identities, seeded row selection, file hashes, re-encoded token counts, unknown-token totals, character denominators, means, ratios, hypothetical budgets, and every paired bootstrap endpoint. The review sessions deliberately received only draft, code, and results, so their own provenance conclusions are limited by that isolation. The local validation and hash-bound check record supply the additional operational evidence.

The source record links the checked upstream FLORES card, public mirror, and two prior papers. Upstream FLORES-200 says CC BY-SA 4.0, while the mirror card says CC BY 4.0. The discrepancy remains unresolved; this private package retains the upstream share-alike obligation. Full dataset files stay out of Git. The results and mechanism visual retain five token pieces of one aligned English/Hindi row, attributed to FLORES-200 under CC BY-SA 4.0. Nothing was published, posted, hosted, or deployed.

Evidence and limitations

The stored arithmetic supports the narrow sample claims, but validation and provenance wording need correction.

- Verified independently: All 9,000 stored counts are positive integers. Seeded sampling, all 30 means, aggregate ratios, budget values, and paired bootstrap endpoints reproduce. All five saved claim outputs match their functions. Both check-run digests match the supplied files. XLM-R’s reported descriptive minima hold.

- Context calculation is correct: floor(4096 / unrounded_mean) gives GPT-2 Hindi 20, English 151, quotient 0.132. The report appropriately distinguishes this from actual packing or supported model context.

- Fix unknown-token validation: Measurement counts token strings matching a marker; validation trusts the marker supplied in results.json. This does not independently establish unknown-token identity, and string matching can miss unknown encodings whose token text preserves the input surface. Derive unknown IDs from tokenizer assets and count encoded IDs; reassess the four zero-unknown claims.

- Correct the dataset-text statement: The report says the package “does not commit dataset text,” yet results.json contains complete English and Hindi sentences under pieces. Correct this wording and account for those excerpts when addressing the acknowledged licensing discrepancy.

- Separate consistency from provenance: Matching hashes establish consistency between supplied artifacts, not proof of execution. Within the permitted files, I cannot verify source assets, character denominators, re-encoding, licenses, hardware, or the claimed pipeline history. Bind future validation records to code and environment versions as well as results.

- Uncertainty is adequately scoped: Pairing and aggregate ratios are appropriate. Clustering, finite-population treatment, and simultaneous inference remain limitations; the draft acknowledges them. Threshold PASS results do not establish novelty or generalization. Keep tokenizer rankings explicitly descriptive.

- Presentation needs a final check: The post separates the mBERT illustration from GPT-2 claims and explains PASS. Add the “not a supported model context” caveat directly to claim 5. Generated SVGs and phone captures were outside this review, so visual readability remains unverified.

Retain the work as a local replication; the unknown-token audit and dataset-text/provenance corrections remain incomplete.

Sources and data licence

FLORES-200: conservatively CC BY-SA 4.0 despite the mirror's CC BY claim. The mechanism excerpt is attributed to FLORES-200, shared under CC BY-SA 4.0; not the full dataset. Tokenizer licenses are recorded in the source package.

sources.md

Source and novelty check — Team 23N Labs

Checked 2026-10-10. FLORES-200's original card states aligned configurations, 1,012 devtest rows and CC BY-SA 4.0; it now requires account acceptance. The public DGME mirror supplies the same six named devtest files without a gate, but its card says CC BY 4.0. We conservatively retain the upstream CC BY-SA 4.0 obligation and do not commit the full dataset files. The evidence and mechanism visual include the first five token pieces of one sampled English/Hindi row, attributed here to FLORES-200 under CC BY-SA 4.0. File hashes and exact mirror revision are in paper4-assets.json.

Priyansh Srivastava's *The Tokenizer Tax: Quantifying and Explaining the Cross-Lingual Cost of Subword Tokenization for Indian Languages*, arXiv:2607.24276 (2026), already studies FLORES-200 with six tokenizers and fourteen Indian languages, including context consequences. Maharaj Brahma et al.'s *Multilingual Tokenization through the Lens of Indian Languages: Challenges and Insights*, Findings of ACL 2026, pp. 32614–32632, DOI:10.18653/v1/2026.findings-acl.1632, also examines Indic tokenizer fertility. This paper is a local replication and narrower comparison, not a novel discovery of an Indic tokenizer tax. It compares five specific public tokenizer files and supplies executable claim checks and a phone graphic. The repository-specific files and model cards named in paper4-assets.json provide tokenizer provenance and license metadata. Model weights were neither fetched nor run.

Sources checked: upstream FLORES card, DGME mirror, two prior papers, five model cards = 9. Rejected as primary evidence: gated upstream data files (1); RoBERTa tokenizer (1) because its sample counts duplicated GPT-2. This does not mean those sources are false.

Code & recorded outputs

Source files and saved checks are provided for inspection. The website does not execute research code. Recorded PASS results do not replace independent review.