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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0ee066
b69d25a
 
 
 
 
1e7a2c9
b69d25a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
---
language:
- en
- code
license: mit
size_categories:
- 100K<n<1M
task_categories:
- text-generation
pretty_name: Yuuki Code Dataset
tags:
- code
- multilingual
- programming
- training-data
- open-source
---

<div align="center">

<br>

<img src="https://img.shields.io/badge/%E2%9C%A6-YUUKI--DATASET-000000?style=for-the-badge&labelColor=000000" alt="Yuuki Dataset" height="50">

<br><br>

# Multilingual Code Training Dataset

**321K code samples. 18 programming languages. Curated from GitHub + HuggingFace.**<br>
**High-quality training data for code generation models. Zero cloud budget.**

<br>

<a href="#dataset-description"><img src="https://img.shields.io/badge/DESCRIPTION-000000?style=for-the-badge" alt="Description"></a>
&nbsp;&nbsp;
<a href="#dataset-structure"><img src="https://img.shields.io/badge/STRUCTURE-000000?style=for-the-badge" alt="Structure"></a>
&nbsp;&nbsp;
<a href="https://github.com/sponsors/aguitauwu"><img src="https://img.shields.io/badge/SPONSOR-000000?style=for-the-badge" alt="Sponsor"></a>

<br><br>

[![License](https://img.shields.io/badge/MIT-222222?style=flat-square&logo=opensourceinitiative&logoColor=white)](LICENSE)
&nbsp;
[![HuggingFace](https://img.shields.io/badge/Datasets-222222?style=flat-square&logo=huggingface&logoColor=white)](https://huggingface.co/datasets)
&nbsp;
[![Python](https://img.shields.io/badge/Python-222222?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
&nbsp;
[![Code](https://img.shields.io/badge/Multilingual-222222?style=flat-square&logo=github&logoColor=white)](https://github.com)
&nbsp;
[![DOI](https://img.shields.io/badge/DOI-10.57967/hf/7809-222222?style=flat-square)](https://doi.org/10.57967/hf/7809)

<br>

---

<br>

<table>
<tr>
<td width="50%" valign="top">

**Curated for quality.**<br><br>
321,000 code samples total.<br>
18 programming languages.<br>
Sourced from GitHub repositories.<br>
Filtered and deduplicated.<br>
Train/validation/test splits.<br>
Ready for model training.<br>
MIT licensed and attribution-complete.

</td>
<td width="50%" valign="top">

**Production-ready.**<br><br>
Structured JSONL format.<br>
Comprehensive metadata fields.<br>
Language detection included.<br>
Source repository tracking.<br>
File path preservation.<br>
<br>
Built for the Yuuki project.

</td>
</tr>
</table>

<br>

</div>

---

<br>

<div align="center">

## Dataset Description

</div>

<br>

**Yuuki Dataset** is a carefully curated collection of high-quality source code from open-source repositories and public datasets. Created specifically for training the [Yuuki language models](https://huggingface.co/OpceanAI/Yuuki-best), this dataset represents real-world code across 18 programming languages, with emphasis on Python, C/C++, JavaScript, and other widely-used languages.

The dataset was assembled with **zero cloud budget** using streaming collection from HuggingFace Datasets and targeted cloning from popular GitHub repositories. Each sample includes the source code, detected programming language, origin source, and (where applicable) repository URL and file path.

Built with rigorous **deduplication**, **quality filtering**, and **language balancing** to ensure diverse, high-quality training data. All code is from permissive open-source licenses (MIT, Apache-2.0, BSD, GPL, etc.) with full attribution metadata preserved.

<br>

### Dataset Summary

- **Total Samples:** 321,000
- **Languages:** 18 (Python, C, C++, JavaScript, Java, Go, Rust, and more)
- **Sources:** GitHub repositories + HuggingFace Datasets
- **License:** MIT
- **Format:** JSONL (JSON Lines)
- **Splits:** Train (257k) / Validation (32.1k) / Test (32.1k)
- **Use Case:** Training code generation and completion models

<br>

---

<br>

<div align="center">

## Supported Tasks

</div>

<br>

<table>
<tr>
<td width="50%" valign="top">

<h3>Code Generation</h3>

Generate complete functions, classes, or modules from natural language descriptions or partial code contexts. The dataset's diverse language coverage and real-world code patterns make it ideal for training models to produce syntactically correct and idiomatic code.

<br>

<h3>Code Completion</h3>

Autocomplete code as developers type. Train models to predict the next tokens, lines, or blocks based on surrounding context. Includes common patterns, API usage, and language-specific idioms.

</td>
<td width="50%" valign="top">

<h3>Program Synthesis</h3>

Learn to translate specifications, comments, or natural language into executable code. The dataset's wide range of programming paradigms (imperative, functional, object-oriented) supports robust synthesis capabilities.

<br>

<h3>Code Translation</h3>

Cross-language translation tasks. With 18 languages represented, models can learn to convert code from one language to another while preserving functionality and idioms.

</td>
</tr>
</table>

<br>

---

<br>

<div align="center">

## Dataset Structure

</div>

<br>

### Data Instances

Each instance in the dataset is a JSON object with the following structure:

```json
{
  "code": "def fibonacci(n):\n    if n <= 1:\n        return n\n    return fibonacci(n-1) + fibonacci(n-2)",
  "language": "python",
  "source": "github",
  "repo": "https://github.com/pytorch/pytorch",
  "path": "examples/recursion/fibonacci.py"
}
```

<br>

### Data Fields

| Field | Type | Description |
|:------|:-----|:------------|
| `code` | `string` | The source code content (1-25.8M characters) |
| `language` | `string` | Detected programming language (18 values) |
| `source` | `string` | Origin source: `github`, `hf:dataset-name`, etc. (4 unique sources) |
| `repo` | `string` | Repository URL if sourced from GitHub (78 unique repos) |
| `path` | `string` | Original file path within repository (0-268 characters) |

<br>

### Data Splits

| Split | Samples | Percentage | Size (approx) |
|:------|:--------|:-----------|:--------------|
| **Train** | 257,000 | 80% | ~15 GB |
| **Validation** | 32,100 | 10% | ~2 GB |
| **Test** | 32,100 | 10% | ~2 GB |
| **Total** | **321,200** | **100%** | **~19 GB** |

Splits are randomized and stratified to maintain language distribution consistency across train/validation/test sets.

<br>

---

<br>

<div align="center">

## Languages

</div>

<br>

The dataset covers 18 programming languages with varying representation:

| Language | Category | Primary Use Cases |
|:---------|:---------|:------------------|
| **C** | Systems | Operating systems, embedded systems, performance-critical code |
| **C++** | Systems | Game engines, high-performance computing, systems software |
| **Python** | General-purpose | Data science, web development, automation, AI/ML |
| **JavaScript** | Web | Frontend development, Node.js backends, full-stack applications |
| **TypeScript** | Web | Type-safe JavaScript for large-scale applications |
| **Java** | Enterprise | Android development, enterprise backends, distributed systems |
| **Go** | Cloud-native | Microservices, cloud infrastructure, concurrent systems |
| **Rust** | Systems | Memory-safe systems programming, WebAssembly, tooling |
| **PHP** | Web | WordPress, Laravel, server-side web development |
| **Ruby** | Web | Rails applications, scripting, web backends |
| **Swift** | Mobile | iOS, macOS, watchOS, tvOS application development |
| **Kotlin** | Mobile | Android development, server-side applications |
| **HTML** | Markup | Web page structure and content |
| **CSS** | Styling | Web page styling and layout |
| **SQL** | Database | Database queries, schema definitions, data manipulation |
| **Shell** | Scripting | Bash, Zsh, shell automation scripts |
| **JSON** | Data | Configuration files, API responses, data interchange |
| **YAML** | Configuration | Config files, CI/CD pipelines, infrastructure as code |

<br>

---

<br>

<div align="center">

## Dataset Creation

</div>

<br>

### Curation Rationale

This dataset was created to train the **Yuuki** code generation models on resource-constrained hardware (specifically, a Snapdragon 685 smartphone) with **zero cloud budget**. The curation process prioritized:

1. **Quality over quantity** — Aggressive filtering for syntax correctness, readability, and real-world patterns
2. **Language diversity** — Balanced representation across major programming languages
3. **License compliance** — Only permissive open-source licenses with full attribution
4. **Deduplication** — Advanced MinHash LSH for near-duplicate detection (80% similarity threshold)
5. **Reproducibility** — All sources documented with repository URLs and file paths

<br>

### Source Data

#### HuggingFace Datasets

- `bigcode/the-stack-dedup` — Deduplicated subset of The Stack
- `bigcode/starcoderdata` — StarCoder training corpus
- `code_search_net` — CodeSearchNet dataset (all languages)
- `codeparrot/github-code` — GitHub code samples
- Additional curated code datasets

#### GitHub Repositories

78 popular open-source repositories were cloned and filtered:

- **Python:** Django, Flask, NumPy, Pandas, PyTorch, TensorFlow, scikit-learn
- **JavaScript/TypeScript:** React, Vue, Angular, Next.js, Node.js, Express
- **Systems:** Linux kernel, PostgreSQL, Redis, Nginx, curl, Git
- **Languages:** Rust, Go, Kotlin, Swift language implementations
- **Frameworks:** Spring Boot, Laravel, Rails, and more

*Full repository list available in dataset metadata.*

<br>

### Data Collection

1. **Streaming Collection** from HuggingFace Datasets (target: ~10GB)
2. **GitHub Cloning** with shallow clones (depth=1) for efficiency
3. **File Extraction** filtering by extension (.py, .js, .c, .cpp, etc.)
4. **Language Detection** based on file extension and content analysis
5. **Quality Filtering** removing minified, generated, and binary files
6. **Deduplication** using SHA-256 exact matching + MinHash LSH (80% threshold)
7. **Balancing** to prevent language dominance (no single language >20%)
8. **Splitting** into 80/10/10 train/validation/test sets

<br>

### Preprocessing

- **Normalization:** Line ending conversion to `\n`, trailing whitespace removal
- **Validation:** Length checks (50-50,000 characters), line length heuristics
- **Exclusion:** Binary files, minified code, generated files (e.g., `_pb2.py`, `.min.js`)
- **Pattern Filtering:** Removed `node_modules`, `vendor`, `__pycache__`, build artifacts

<br>

---

<br>

<div align="center">

## Considerations for Using the Data

</div>

<br>

### Social Impact

Democratizes access to high-quality code training data for researchers and developers without access to expensive compute resources or proprietary datasets. Enables training competitive code models on consumer hardware.

<br>

### Discussion of Biases

<table>
<tr>
<td width="50%" valign="top">

<h4>Language Bias</h4>

Overrepresentation of popular languages (Python, JavaScript, C/C++). Underrepresentation of niche or domain-specific languages (Fortran, COBOL, R).

<br>

<h4>Domain Bias</h4>

Web development and data science code is overrepresented compared to embedded systems, scientific computing, or enterprise applications.

</td>
<td width="50%" valign="top">

<h4>Cultural Bias</h4>

English-centric variable names, comments, and documentation. Code from Western/US developers may dominate due to GitHub's demographics.

<br>

<h4>Recency Bias</h4>

Modern coding patterns favored. Legacy code, deprecated APIs, and historical programming styles underrepresented.

</td>
</tr>
</table>

<br>

### Other Known Limitations

- **Snapshot in time:** Dataset reflects code patterns from early 2026
- **Quality variance:** Some low-quality or educational code may remain despite filtering
- **License diversity:** Mix of licenses (MIT, Apache, GPL, BSD); users must verify compatibility for commercial use
- **Incomplete attribution:** Some samples from aggregated datasets may lack complete provenance

<br>

---

<br>

<div align="center">

## Usage

</div>

<br>

### Load with HuggingFace Datasets

```python
from datasets import load_dataset

# Load the full dataset
dataset = load_dataset("OpceanAI/Yuuki-dataset")

# Access splits
train_data = dataset["train"]
val_data = dataset["validation"]
test_data = dataset["test"]

# Iterate through samples
for sample in train_data:
    code = sample["code"]
    language = sample["language"]
    print(f"Language: {language}")
    print(f"Code: {code[:100]}...")  # First 100 chars
```

<br>

### Load with Pandas

```python
import pandas as pd

# Load a specific split
df = pd.read_json("hf://datasets/OpceanAI/Yuuki-dataset/train-00000-of-00001.parquet")

# Filter by language
python_code = df[df["language"] == "python"]

# Group by source
by_source = df.groupby("source").size()
print(by_source)
```

<br>

### Filter by Language

```python
from datasets import load_dataset

dataset = load_dataset("OpceanAI/Yuuki-dataset", split="train")

# Get all Python samples
python_samples = dataset.filter(lambda x: x["language"] == "python")

# Get all JavaScript/TypeScript samples
js_samples = dataset.filter(lambda x: x["language"] in ["javascript", "typescript"])
```

<br>

---

<br>

<div align="center">

## Citation

</div>

<br>

If you use this dataset in your research or projects, please cite:

```bibtex
@misc{yuuki-dataset-2026,
  author = {agua_omg},
  title = {Yuuki Code Dataset: Multilingual Code Training Data},
  year = {2026},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/datasets/OpceanAI/Yuuki-dataset}},
  doi = {10.57967/hf/7809}
}
```

<br>

---

<br>

<div align="center">

## Related Projects

</div>

<br>

| Project | Description |
|:--------|:------------|
| [Yuuki Models](https://huggingface.co/OpceanAI/Yuuki-best) | Code generation models trained on this dataset |
| [Yuuki API](https://github.com/YuuKi-OS/Yuuki-api) | Inference API for Yuuki models |
| [Yuuki Chat](https://github.com/YuuKi-OS/yuuki-chat) | Web chat interface for Yuuki models |
| [yuy CLI](https://github.com/YuuKi-OS/yuy) | Command-line tool for running Yuuki models |
| [yuy-chat](https://github.com/YuuKi-OS/yuy-chat) | Terminal UI chat interface |
| [Yuuki Web](https://github.com/YuuKi-OS/yuuki-web) | Official landing page |

<br>

---

<br>

<div align="center">

## Links

</div>

<br>

<div align="center">

[![Dataset Viewer](https://img.shields.io/badge/Dataset_Viewer-Hugging_Face-ffd21e?style=for-the-badge&logo=huggingface&logoColor=black)](https://huggingface.co/datasets/OpceanAI/Yuuki-dataset/viewer/)
&nbsp;
[![Model Weights](https://img.shields.io/badge/Yuuki_Models-Hugging_Face-ffd21e?style=for-the-badge&logo=huggingface&logoColor=black)](https://huggingface.co/OpceanAI/Yuuki-best)
&nbsp;
[![API](https://img.shields.io/badge/Yuuki_API-Spaces-ffd21e?style=for-the-badge&logo=huggingface&logoColor=black)](https://huggingface.co/spaces/OpceanAI/Yuuki-api)

<br>

[![GitHub](https://img.shields.io/badge/YuuKi--OS-GitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com/YuuKi-OS)
&nbsp;
[![Paper](https://img.shields.io/badge/Research_Paper-Documentation-222222?style=for-the-badge&logo=readme&logoColor=white)](https://drive.google.com/drive/folders/1IVoaI_FdNBxWGH-zBsnG24Gc5hIxKc4A)
&nbsp;
[![Sponsor](https://img.shields.io/badge/Sponsor-GitHub_Sponsors-ea4aaa?style=for-the-badge&logo=githubsponsors&logoColor=white)](https://github.com/sponsors/aguitauwu)

</div>

<br>

---

<br>

<div align="center">

## License

</div>

<br>

```
MIT License

Copyright (c) 2026 Yuuki Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

<br>

### Individual Code Licenses

While the **dataset itself** is released under MIT License, individual code samples within the dataset retain their original licenses. When using code from this dataset:

- **Verify the license** of the source repository before commercial use
- **Respect original attributions** and copyright notices
- **Common licenses in dataset:** MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, GPL-2.0, GPL-3.0, LGPL

See the `repo` and `source` fields in each sample for license information of the original source.

<br>

---

<br>

<div align="center">

## Acknowledgments

</div>

<br>

This dataset builds upon the incredible work of:

- **BigCode** — The Stack and StarCoder datasets
- **GitHub** — Open-source repository hosting
- **HuggingFace** — Dataset hosting and infrastructure
- **All open-source contributors** whose code is included in this dataset

Special thanks to the maintainers of the 78 repositories included in this collection.

<br>

---

<br>

<div align="center">

**Curated with patience, a phone, and zero budget.**

<br>

[![Yuuki Project](https://img.shields.io/badge/Yuuki_Project-2026-000000?style=for-the-badge)](https://huggingface.co/OpceanAI)

<br>

</div>