Yuuki-dataset / README.md
OpceanAI's picture
Update README.md
1e7a2c9 verified
---
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>