Datasets:
language:
- si
license: mit
size_categories:
- 100K<n<1M
task_categories:
- text-generation
pretty_name: UltraChat-Sinhala
source_datasets:
- HuggingFaceH4/ultrachat_200k
tags:
- sinhala
- machine-translation
- nllb
- instruction-tuning
- sft
configs:
- config_name: default
data_files:
- split: train_sft
path: data/train_sft.parquet
- split: test_sft
path: data/test_sft.parquet
- split: train_gen
path: data/train_gen.parquet
- split: test_gen
path: data/test_gen.parquet
dataset_info:
features:
- name: prompt
dtype: string
- name: prompt_id
dtype: string
- name: messages
list:
- name: content
dtype: string
- name: role
dtype: string
splits:
- name: train_sft
num_bytes: 3220638735
num_examples: 207831
- name: test_sft
num_bytes: 356835963
num_examples: 23106
- name: train_gen
num_bytes: 3112868195
num_examples: 255974
- name: test_gen
num_bytes: 342615462
num_examples: 28300
download_size: 1568756226
dataset_size: 7032958355
Dataset Card for UltraChat-Sinhala
Dataset Description
UltraChat-Sinhala is a Sinhala (සිංහල) machine translation of
HuggingFaceH4/ultrachat_200k,
built to supervised-fine-tune Sinhala large language models. It preserves the
original dataset's structure, splits, and prompt_ids, so it is a drop-in
Sinhala counterpart to the English source.
The English dialogues were translated with
NLLB-200-3.3B
(eng_Latn → sin_Sinh) and then put through a Sinhala-specific cleaning
pipeline (conjunct/ZWJ repair, masking-leak repair, filtering). The dataset
contains 515,211 dialogues / ≈528M Sinhala tokens (SinLLaMA tokenizer).
Dataset Creation
Translation. Each dialogue turn was translated en→si with NLLB-200-3.3B (greedy decoding). To respect the model's 512-token limit, turns were sentence-segmented with the line layout preserved on reassembly. Spans that must not be translated — fenced/inline code, URLs, e-mail addresses, HTML tags, LaTeX/maths and markdown links — were masked before translation and restored afterwards, so they pass through verbatim.
Sinhala conjunct (ZWJ) repair. NLLB's SentencePiece normaliser strips the Zero-Width Joiner (
U+200D) from Sinhala conjunct clusters, emitting a space instead (e.g.ප් රforප්ර). A lexicon-gated restorer — built from a Sinhala corpus plus the tokenizer's vocabulary — re-inserts the joiner only where attested. After repair, ~99.6–99.9% of dialogues carry conjunct joiners.Masking-leak repair. The placeholder used to mask the protected spans was itself corrupted by SentencePiece (its rare brackets were stripped), displacing each masked span to the end of its message with a stray digit left behind. These were re-inserted in their correct positions by re-aligning each message to its English source (≈83% reconstructed exactly in place; the rest re-appended without any content loss).
Filtering. Dialogues containing empty/whitespace-only turns were dropped (a mid-conversation turn cannot be removed without breaking the user/assistant alternation);
prompt_ids were de-duplicated; and oneprompt_idshared between the SFT and GEN sets was removed for global id-uniqueness.Train/test split. Membership is taken verbatim from the original ultrachat_200k split by
prompt_id, so the Sinhala split is identical to the English source (≈10% test). It is leak-checked: noprompt_idand no identical dialogue appears in both train and test, in either SFT or GEN.
Dataset Structure
Like the source, the dataset has four splits, suitable for:
- Supervised fine-tuning (
sft). - Generation ranking (
gen) via techniques like rejection sampling or PPO.
| split | examples | tokens |
|---|---|---|
| train_sft | 207,831 | 248,133,641 |
| test_sft | 23,106 | 27,467,232 |
| train_gen | 255,974 | 227,432,690 |
| test_gen | 28,300 | 25,035,938 |
| total | 515,211 | 528,069,501 |
Tokens are raw message-content tokens (the SinLLaMA tokenizer, vocab 139,336, has no chat template; a real SFT run adds a small per-turn special-token overhead).
The dataset is stored in parquet (zstd), schema-identical to the source:
{
"prompt": "ආහාර පිසීමේ ව්යාපාරයක් සඳහා වට්ටෝරු පොතක් නිර්මාණය කරන්න. ...",
"prompt_id": "7d86ffeefdea030c92138e0b964c304508bfebed4b23261c8a741630823e6f96",
"messages": [
{
"role": "user",
"content": "ආහාර පිසීමේ ව්යාපාරයක් සඳහා වට්ටෝරු පොතක් නිර්මාණය කරන්න. ..."
},
{
"role": "assistant",
"content": "නම: රසවත් ආහාර පිසීමේ රහස්: රසවත් හා ලස්සන ආහාර පිසීමේ වට්ටෝරු පොත ..."
},
{
"role": "user",
"content": "ඔයා මේ වෙනකම් හදපු වට්ටෝරු පොත නම් නියමයි. ඔයාට පුලුවන්ද තව විස්තර එකතු කරන්න ..."
},
{
"role": "assistant",
"content": "..."
}
]
}
Quality and Limitations
Full-scan checks on the released data: 100% valid JSON, correct
user/assistant alternation, no empty turns, no duplicate prompt_ids.
~0.017% of turns remain in Latin script (overwhelmingly fenced code, which is
preserved by design), and ~0.5% of longer turns show NLLB repetition
artifacts.
This is machine translation without human post-editing. Expect:
- translationese and occasional mistranslation, especially on idioms, named entities, and technical content;
- code, identifiers, URLs and maths intentionally left in their original form;
- a minority of turns with NLLB repetition loops (~0.5%);
- residual orthographic edge cases not covered by the conjunct lexicon.
It is intended for instruction-tuning and research, not as a gold-standard reference translation.
Licensing
Released under the MIT License, following the source dataset
HuggingFaceH4/ultrachat_200k. The Sinhala text was produced by machine
translation with NLLB-200.