Datasets:
File size: 8,500 Bytes
b6ed90b 1f0d8e3 6cd5373 feb6765 6cd5373 e949098 6cd5373 e949098 6cd5373 6bbb320 6cd5373 f132c45 f6be5e8 f132c45 6bbb320 fd5b17c f6be5e8 fd5b17c f6be5e8 fd5b17c f6be5e8 7694435 f132c45 f6be5e8 e233d6a f132c45 f6be5e8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
---
license: mit
task_categories:
- translation
language:
- tk
- en
tags:
- parallel-corpus
- translation
- turkmen
- english
- machine-translation
- tk
- en
- central-asia
pretty_name: Turkmen - English Small Sentences Corpus
size_categories:
- n<1K
dataset_info:
features:
- name: translation
struct:
- name: en
dtype: string
- name: tk
dtype: string
splits:
- name: train
num_bytes: 188025
num_examples: 495
- name: validation
num_bytes: 25676
num_examples: 62
- name: test
num_bytes: 24018
num_examples: 62
download_size: 137612
dataset_size: 237719
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
---
## TL;DR & Quick results
Try it on [Space demo](https://huggingface.co/spaces/XSkills/nllb-turkmen-english) Article with full technical journey is available [Medium](https://medium.com/@meinnps/fine-tuning-nllb-200-with-lora-on-a-650-sentence-turkmen-english-corpus-082f68bdec71).
## Dataset Description
*(This dataset was created particularly to experiment with fine-tuning NLLB-200 model. You can try the outcome model on [this Space](https://huggingface.co/spaces/XSkills/nllb-turkmen-english) or observe the model [here](https://huggingface.co/XSkills/nllb-200-turkmen-english-lora))*
**Dataset Summary**
This dataset provides a parallel corpus of small sentences in Turkmen (`tk`) and English (`en`). It consists of approximately 500-700 sentence pairs, designed primarily for machine translation tasks, particularly for fine-tuning large multilingual models like NLLB for the Turkmen-English language pair.
```json
DatasetDict({
train: Dataset({
features: ['translation'],
num_rows: 495
})
validation: Dataset({
features: ['translation'],
num_rows: 62
})
test: Dataset({
features: ['translation'],
num_rows: 62
})
})
```
**Supported Tasks and Leaderboards**
* `translation`: The dataset is primarily intended for training or fine-tuning machine translation models, specifically from Turkmen to English and potentially English to Turkmen.
**Languages**
* Turkmen (`tk`) - Latin script
* English (`en`)
**Data Source and Collection**
The sentence pairs were manually collated from publicly available sources:
1. Translated books authored by Gurbanguly Berdimuhamedov, obtained from the official Turkmenistan government portal: <https://maslahat.gov.tm/books>.
2. Supplementary translated materials sourced from various public journals from <https://metbugat.gov.tm>.
The text was extracted and aligned into parallel sentences.
**Data Structure**
The dataset is expected to contain pairs of sentences, typically structured with one column for the Turkmen sentence and another for the corresponding English translation. (You might want to specify the exact column names here once you finalize your data file, e.g., `{'translation': {'tk': '...', 'en': '...'}}` which is a common format).
**Intended Use**
This corpus was created as part of a Deep Learning course project focused on evaluating parameter-efficient fine-tuning (PEFT) techniques. The primary goal is to adapt large pre-trained models (like Meta AI's NLLB) to the specific nuances of the Turkmen-English language pair, potentially improving translation quality, especially within the domains represented by the source materials (e.g., official texts, specific publications). Although relatively small, it serves as a valuable resource for exploring model adaptation for lower-resource languages or specific domains.
**Limitations and Bias**
* **Size:** The dataset is small (under 1,000 sentence pairs), which limits its utility for training large models from scratch but makes it suitable for fine-tuning experiments.
* **Domain:** The data is sourced primarily from specific official texts and journals. Therefore, models fine-tuned on this dataset might exhibit better performance on similar domains but may not generalize as well to other types of text (e.g., casual conversation, technical manuals).
* **Potential Bias:** As the source material comes from specific authors and official publications, it may reflect particular viewpoints, styles, or topics inherent in those sources. Users should be aware of this potential bias when using the dataset or models trained on it.
**(Optional: Add sections on Data Splits, Licensing, Citation if applicable)**
## Using this Dataset with NLLB-200
This dataset is specifically designed for fine-tuning the NLLB-200 model for Turkmen-English translation. Here's how to use it:
```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, Seq2SeqTrainingArguments, Seq2SeqTrainer, DataCollatorForSeq2Seq
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("XSkills/turkmen_english_s500")
# Load NLLB-200 model and tokenizer
model_name = "facebook/nllb-200-distilled-600M" # Or other NLLB variants
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Set source and target languages
src_lang = "eng_Latn" # English
tgt_lang = "tuk_Latn" # Turkmen
# Preprocess function
def preprocess_function(examples):
inputs = [example['en'] for example in examples['translation']]
targets = [example['tk'] for example in examples['translation']]
model_inputs = tokenizer(inputs, text_target=targets, max_length=128, truncation=True)
return model_inputs
# Apply preprocessing
tokenized_datasets = dataset.map(preprocess_function, batched=True)
# Training arguments
training_args = Seq2SeqTrainingArguments(
output_dir="./nllb-turkmen-english",
evaluation_strategy="epoch",
learning_rate=5e-5,
per_device_train_batch_size=16,
per_device_eval_batch_size=16,
weight_decay=0.01,
save_total_limit=3,
num_train_epochs=3,
predict_with_generate=True,
fp16=True,
)
# Data collator
data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=model)
# Initialize trainer
trainer = Seq2SeqTrainer(
model=model,
args=training_args,
train_dataset=tokenized_datasets["train"],
eval_dataset=tokenized_datasets["validation"],
tokenizer=tokenizer,
data_collator=data_collator,
)
# Train model
trainer.train()
```
## Contributors
A huge thank you to the following individuals for their contributions to creating and preparing this dataset:
* [Shemshat Nazarova](https://huggingface.co/Shemshat) (Extracting and aligning 500 sentneces from the magazines)
## Contributing to the Turkmen-English Corpus
### What to Contribute
- **Human-translated sentences only** (no machine translation)
- **Diverse content** beyond official texts (conversational phrases, technical terms)
- **Natural language** representing everyday Turkmen usage
- **Verified translations** checked by native speakers when possible
### How to Submit
1. Format your data as:
- CSV with two columns (Turkmen and English)
- JSON matching `{'translation': {'tk': '...', 'en': '...'}}`
- Text files with aligned sentences
2. Include source information and confirm you have rights to share
3. Submit via:
- Email: [email protected]
- LinkedIn: linkedin.com/in/merdandt
- Telegram: t.me/merdandt
### Quality Standards
- Ensure accurate translations
- Remove duplicates
- Correct any spelling/grammar errors
- Focus on natural expression
All contributors will be acknowledged in the dataset documentation.
## Citation
If you use this dataset in your research or projects, please cite it as:
```
@dataset{yourname2025turkmen,
author = {Merdan Durdyyev and Shemshat Nazarova },
title = {Turkmen-English Small Sentences Corpus},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/XSkills/turkmen_english_s500}}
}
```
## Acknowledgements
Special thanks to [Shemshat Nazarova](https://huggingface.co/Shemshat) for extracting and aligning 500 sentences from various magazines, making this resource possible.
## Contact
If you have questions, suggestions or want the bigger dataset, please reach out through[e-mail]([email protected]), [LinkedIn]( https://linkedin.com/in/merdandt) or [Telegram](https://t.me/merdandt).
## Future Work
We plan to expand this dataset with more sentence pairs and cover a broader range of domains beyond official texts. Contributions are welcome!
|