Datasets:
init: create README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,110 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
- text2text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
- ur
|
| 9 |
+
- am
|
| 10 |
+
- zh
|
| 11 |
+
tags:
|
| 12 |
+
- code
|
| 13 |
+
- multilingual
|
| 14 |
+
- legesher
|
| 15 |
+
- transpilation
|
| 16 |
+
- tiny-aya-expedition
|
| 17 |
+
- language-decoded
|
| 18 |
+
pretty_name: Language Decoded Data
|
| 19 |
+
size_categories:
|
| 20 |
+
- 10K<n<100K
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Language Decoded | Multilingual Code Dataset
|
| 24 |
+
|
| 25 |
+
Multilingual Python code datasets for the **Language Decoded** project (part of Cohere's Tiny Aya Expedition), investigating whether code's reasoning benefit for language models is **language-dependent** or **structure-dependent**.
|
| 26 |
+
|
| 27 |
+
## Research Question
|
| 28 |
+
|
| 29 |
+
> Does fine-tuning on non-English code (Python with translated keywords) improve multilingual reasoning as much as English code does?
|
| 30 |
+
|
| 31 |
+
Prior work ([Aryabumi et al., 2024](https://arxiv.org/abs/2408.10914)) showed English code improves English reasoning by 8.2%, but never tested non-English code. This dataset enables that experiment.
|
| 32 |
+
|
| 33 |
+
## Dataset Structure
|
| 34 |
+
|
| 35 |
+
This repo contains multiple experimental conditions as subdirectories:
|
| 36 |
+
|
| 37 |
+
| Subdirectory | Condition | Description |
|
| 38 |
+
|---|---|---|
|
| 39 |
+
| `source-python/` | Source | Filtered Python files from The Stack (shared base) |
|
| 40 |
+
| `baseline/` | Condition 1 | No code augmentation (control) |
|
| 41 |
+
| `english-code/` | Condition 2 | Original English-keyword Python code |
|
| 42 |
+
| `multilingual-code-ur/` | Condition 3a | Python transpiled to Urdu keywords via Legesher |
|
| 43 |
+
| `multilingual-code-am/` | Condition 3b | Python transpiled to Amharic keywords via Legesher |
|
| 44 |
+
| `multilingual-code-zh/` | Condition 3c | Python transpiled to Chinese keywords via Legesher |
|
| 45 |
+
| `multilingual-text/` | Condition 4 | Non-code multilingual text (control) |
|
| 46 |
+
|
| 47 |
+
## Usage
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
from datasets import load_dataset
|
| 51 |
+
|
| 52 |
+
# Load a specific condition
|
| 53 |
+
ds = load_dataset("Legesher/language-decoded-data", data_dir="multilingual-code-ur")
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
## Transpilation
|
| 57 |
+
|
| 58 |
+
Code translation is performed using [Legesher](https://github.com/Legesher/legesher), which translates Python reserved words (keywords, builtins, exceptions) into target languages while preserving code structure and semantics.
|
| 59 |
+
|
| 60 |
+
Example (English → Chinese):
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
# English
|
| 64 |
+
for item in range(10):
|
| 65 |
+
if item > 5:
|
| 66 |
+
print(item)
|
| 67 |
+
|
| 68 |
+
# Chinese / 中文 (via Legesher)
|
| 69 |
+
循环 元素 在 范围(10):
|
| 70 |
+
如果 元素 > 5:
|
| 71 |
+
打印(元素)
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
## Source Data
|
| 75 |
+
|
| 76 |
+
- **Base**: [The Stack](https://huggingface.co/datasets/bigcode/the-stack-dedup) — permissively licensed Python subset
|
| 77 |
+
- **Filtering**: Quality-filtered to 50K-100K files
|
| 78 |
+
- **Transpilation tool**: [Legesher v0.6.0+](https://github.com/Legesher/legesher)
|
| 79 |
+
|
| 80 |
+
## Evaluation Benchmarks
|
| 81 |
+
|
| 82 |
+
Models fine-tuned on these conditions are evaluated on:
|
| 83 |
+
|
| 84 |
+
- **XNLI** — Cross-lingual natural language inference (15 languages)
|
| 85 |
+
- **XStoryCloze** — Story completion (11 languages)
|
| 86 |
+
- **TyDi QA** — Question answering (11 languages)
|
| 87 |
+
- **MMLU** — Multilingual knowledge
|
| 88 |
+
|
| 89 |
+
## Related Resources
|
| 90 |
+
|
| 91 |
+
- **Models**: [Legesher/language-decoded-lora](https://huggingface.co/Legesher/language-decoded-lora) — LoRA adapters trained on these conditions
|
| 92 |
+
- **Community code**: [Legesher/language-decoded-community](https://huggingface.co/datasets/Legesher/language-decoded-community) — Human-written native language code
|
| 93 |
+
- **Experiments**: [Legesher/language-decoded-experiments](https://huggingface.co/datasets/Legesher/language-decoded-experiments) — Training logs and eval results
|
| 94 |
+
- **Paper**: Coming soon
|
| 95 |
+
|
| 96 |
+
## Citation
|
| 97 |
+
|
| 98 |
+
```bibtex
|
| 99 |
+
@misc{language-decoded-2026,
|
| 100 |
+
title={Language Decoded: Investigating Language-Dependent vs. Structure-Dependent Reasoning Benefits of Code},
|
| 101 |
+
author={Madison Edgar and Saad Bazaz and Rafay Mustafa and Sarah Jawaid and Rashik Shahjahan and Khojasteh Mirza and Sohaib Bazaz},
|
| 102 |
+
year={2026},
|
| 103 |
+
publisher={Hugging Face},
|
| 104 |
+
url={https://huggingface.co/datasets/Legesher/language-decoded-data}
|
| 105 |
+
}
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
## License
|
| 109 |
+
|
| 110 |
+
Apache 2.0
|