| --- |
| 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: meinnps@gmail.com |
| - 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](meinnps@gmail.com), [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! |
|
|