The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
vocab_size: int64
uk_tpw: double
en_tpw: double
ratio: double
actual_vocab: int64
balanced_200k: struct<mean: double, ci_lo: double, ci_hi: double>
child 0, mean: double
child 1, ci_lo: double
child 2, ci_hi: double
o200k_production: struct<mean: double, ci_lo: double, ci_hi: double>
child 0, mean: double
child 1, ci_lo: double
child 2, ci_hi: double
paired_bootstrap: struct<n_boot: int64, p_value_upper_bound: double, mean_improvement_tokens_per_word: double>
child 0, n_boot: int64
child 1, p_value_upper_bound: double
child 2, mean_improvement_tokens_per_word: double
to
{'balanced_200k': {'mean': Value('float64'), 'ci_lo': Value('float64'), 'ci_hi': Value('float64')}, 'o200k_production': {'mean': Value('float64'), 'ci_lo': Value('float64'), 'ci_hi': Value('float64')}, 'paired_bootstrap': {'n_boot': Value('int64'), 'p_value_upper_bound': Value('float64'), 'mean_improvement_tokens_per_word': Value('float64')}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 478, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
vocab_size: int64
uk_tpw: double
en_tpw: double
ratio: double
actual_vocab: int64
balanced_200k: struct<mean: double, ci_lo: double, ci_hi: double>
child 0, mean: double
child 1, ci_lo: double
child 2, ci_hi: double
o200k_production: struct<mean: double, ci_lo: double, ci_hi: double>
child 0, mean: double
child 1, ci_lo: double
child 2, ci_hi: double
paired_bootstrap: struct<n_boot: int64, p_value_upper_bound: double, mean_improvement_tokens_per_word: double>
child 0, n_boot: int64
child 1, p_value_upper_bound: double
child 2, mean_improvement_tokens_per_word: double
to
{'balanced_200k': {'mean': Value('float64'), 'ci_lo': Value('float64'), 'ci_hi': Value('float64')}, 'o200k_production': {'mean': Value('float64'), 'ci_lo': Value('float64'), 'ci_hi': Value('float64')}, 'paired_bootstrap': {'n_boot': Value('int64'), 'p_value_upper_bound': Value('float64'), 'mean_improvement_tokens_per_word': Value('float64')}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Cyrillic Tokenization Overhead Benchmark
This dataset accompanies the paper "Two Bytes per Letter: Tokenization Overhead in Cyrillic AI Systems" submitted to the MRL Workshop at EMNLP 2026. It contains all the data needed to reproduce the paper's three studies, along with a balanced BPE tokenizer trained as part of the research.
What's inside
| Directory | What it contains |
|---|---|
study01_corpus_benchmark/ |
Tokenization fertility measured on the BrUK corpus (1.34M Ukrainian words) across 8 commercial tokenizers |
study02_dictionary_benchmark/ |
Cyrillic-vs-Latin tokenization costs for 5 languages totaling 8.36M word forms |
study03_ecommerce_rag/ |
A 1,536-product Ukrainian e-commerce knowledge base with 145 queries, token counts, and accuracy validation |
balanced_tokenizer/ |
Balanced BPE tokenizers at 4 vocab sizes + 11 sweep configs, with evaluation outputs |
Study 1 -- Corpus benchmark
We tokenized the BrUK corpus (Maksymenko & Turuta, 2025) with 8 commercial tokenizers and recorded tokens-per-word (fertility). Word counting follows the paper's convention where punctuation counts as a separate token ([\w]+|[^\w\s]).
fertility.parquet-- one row per tokenizer: name, total tokens, total words, fertility, characters per tokenvocab_analysis.parquet-- Cyrillic vocabulary size and average characters per Cyrillic entry for each tokenizer
The BrUK corpus text is not included here. It can be downloaded from brown-uk/corpus.
Study 2 -- Dictionary benchmark
We compiled word-form dictionaries for five languages that have both standardized Cyrillic and Latin orthographies, tokenized every word in both scripts, and compared the cost.
| Language | Word forms | Script situation | Source |
|---|---|---|---|
| Ukrainian | 2,787,452 | Cyrillic-only | lang-uk dictionary |
| Serbian | 2,051,643 | Both scripts in active use | turanjanin/serbian-language-tools |
| Moldovan | 1,555,360 | Switched to Latin (Romanian) | Wiktionary dump |
| Kazakh | 1,173,925 | Mid-transition to Latin | taem/hunspell-kk |
| Azerbaijani | 801,603 | Switched to Latin in 2001 | Hunspell az_AZ |
Files:
five_languages.parquet-- summary table with columns: language, tokenizer, word count, Latin tokens, Cyrillic tokens, penalty percentage, and script status- Individual
{language}.parquetfiles with per-tokenizer breakdowns romanization_full.csv-- Ukrainian romanization impact across three official systems (KMU 55, DSTU 9112 System A, DSTU 9112 System B) and six tokenizers
Study 3 -- E-commerce RAG benchmark
A production-scale benchmark built from 1,536 real product listings retrieved from Rozetka, Ukraine's largest online retailer.
Knowledge base (knowledge_base.parquet):
1,536 products across 10 categories (headphones, smartphones, laptops, vacuum cleaners, TVs, routers, monitors, washing machines, refrigerators, tablets). Each row contains the product ID, title, price in UAH, brand, rating, review count, category, and a full-text document suitable for RAG retrieval.
Queries (queries.json):
145 deterministic queries in seven types -- price lookup (50), budget filter (27), brand search (20), product comparison (18), top-3 by rating (10), cheapest (10), and most expensive (10). Each query includes Ukrainian text, an English translation, a KMU-55 transliteration, and the expected answer derived from the knowledge base.
Token counts (token_comparison.parquet):
Every query tokenized in three language variants (Ukrainian, English, transliterated) across six tokenizers (o200k, Llama 4, Gemma 4, Qwen 3.5, Mistral Small, Grok), with and without LLMLingua-2 compression at rate 0.5. That's 145 queries x 3 languages = 435 rows.
Accuracy validation (accuracy_validation.parquet):
For each of the 145 queries, whether the expected value (price, rating, brand name) was present in the retrieved context before and after compression. Of 80 queries where retrieval succeeded, compression preserved all checked values -- zero losses.
LLM validation (llm_validation.parquet):
End-to-end evaluation: we sent both raw and compressed contexts to Gemini 2.5 Flash and checked whether the model's answer contained the expected value. Result: 74 out of 80 correct in both conditions. The six errors were identical across raw and compressed inputs -- compression caused no additional failures.
Balanced tokenizer
We trained byte-level BPE tokenizers on equal amounts of English (Brown corpus) and Ukrainian (BrUK corpus) text using the HuggingFace tokenizers library with the full 256-byte initial alphabet. We trained at four requested vocabulary sizes (32K, 50K, 100K, 200K); at 200K, BPE converged at 158,184 entries as the training data exhausted available merges. We also trained 11 sweep configurations at 100K vocab varying the Ukrainian data share from 0% to 100%.
The file tokenizer_balanced.json can be loaded directly:
from tokenizers import Tokenizer
tok = Tokenizer.from_file("balanced_tokenizer/tokenizer_balanced.json")
tokens = tok.encode("Привіт, як справи?")
print(len(tokens.ids))
On held-out test data (5,000 words per language, 80/20 split, seed 42), the 158K balanced tokenizer achieves a UK/EN ratio of 1.30x compared to 2.22x for production o200k (200K vocab) -- fewer vocabulary entries, better allocation.
Data collection and ethics
The BrUK and Brown corpora are not redistributed; they must be obtained from their original sources (brown-uk/corpus and NLTK, respectively). Product data from Rozetka was retrieved through the public API and contains only factual commercial information (titles, prices, specifications). No personal data is included anywhere in this dataset. Compression evaluation used the Google Gemini 2.5 Flash API. No human subjects were involved.
Citation
@inproceedings{dobrovolskyi2026twobytes,
title={Two Bytes per Letter: Tokenization Overhead in Cyrillic {AI} Systems},
author={Dobrovolskyi, Ivan},
booktitle={Proceedings of the 6th Workshop on Multilingual Representation Learning (MRL)},
year={2026}
}
License
Apache 2.0
- Downloads last month
- 52