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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- code
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- code
|
| 9 |
+
- coding
|
| 10 |
+
- synthetic
|
| 11 |
+
- instruction-tuning
|
| 12 |
+
- sharegpt
|
| 13 |
+
- alpaca
|
| 14 |
+
- multi-language
|
| 15 |
+
- 2b-model
|
| 16 |
+
- fine-tuning
|
| 17 |
+
size_categories:
|
| 18 |
+
- 1M<n<10M
|
| 19 |
---
|
| 20 |
+
|
| 21 |
+
# Synthetic Coding Dataset v1
|
| 22 |
+
|
| 23 |
+
A large-scale synthetic coding dataset designed for training and fine-tuning ~2B parameter language models. Contains **~1.5M instruction-response pairs** spanning **22 programming languages** and **10 task categories**, formatted in the ShareGPT/Alpaca hybrid conversation schema.
|
| 24 |
+
|
| 25 |
+
## Dataset Summary
|
| 26 |
+
|
| 27 |
+
| Property | Value |
|
| 28 |
+
|---|---|
|
| 29 |
+
| **Total Entries** | ~1,500,000 |
|
| 30 |
+
| **Total Size** | ~4.48 GB |
|
| 31 |
+
| **Format** | JSONL (63 part files) |
|
| 32 |
+
| **Schema** | ShareGPT/Alpaca hybrid (conversations array) |
|
| 33 |
+
| **Languages** | 22 programming languages |
|
| 34 |
+
| **Task Categories** | 10 types |
|
| 35 |
+
| **Difficulty Levels** | 4 (beginner to expert) |
|
| 36 |
+
| **Generated** | 2026-06-22 |
|
| 37 |
+
|
| 38 |
+
## Supported Languages
|
| 39 |
+
|
| 40 |
+
Python, JavaScript, TypeScript, Java, C++, Go, Rust, C#, Ruby, PHP, Kotlin, Swift, Scala, C, Lua, Julia, Elixir, Haskell, OCaml, Dart, R, Bash
|
| 41 |
+
|
| 42 |
+
## Task Categories
|
| 43 |
+
|
| 44 |
+
| Category | Description |
|
| 45 |
+
|---|---|
|
| 46 |
+
| `code_generation` | Write functions, classes, and complete programs |
|
| 47 |
+
| `debugging` | Find and fix bugs in existing code |
|
| 48 |
+
| `explanation` | Explain programming concepts and code behavior |
|
| 49 |
+
| `refactoring` | Improve code quality, readability, and structure |
|
| 50 |
+
| `algorithm` | Implement classic and advanced algorithms |
|
| 51 |
+
| `system_design` | Design scalable systems and architectures |
|
| 52 |
+
| `code_review` | Review and critique code for issues |
|
| 53 |
+
| `best_practices` | Language-specific idioms and best practices |
|
| 54 |
+
| `design_pattern` | Explain and implement design patterns |
|
| 55 |
+
| `data_structure` | Implement and manipulate data structures |
|
| 56 |
+
|
| 57 |
+
## Difficulty Levels
|
| 58 |
+
|
| 59 |
+
- **beginner** — Basic syntax, simple loops, conditionals, and introductory concepts
|
| 60 |
+
- **intermediate** — Standard design patterns, common algorithms, and typical development tasks
|
| 61 |
+
- **advanced** — Complex algorithms, performance optimization, and non-trivial problem solving
|
| 62 |
+
- **expert** — System design, architecture decisions, and large-scale engineering challenges
|
| 63 |
+
|
| 64 |
+
## Data Format
|
| 65 |
+
|
| 66 |
+
Each line in the JSONL files is a JSON object with the following structure:
|
| 67 |
+
|
| 68 |
+
```json
|
| 69 |
+
{
|
| 70 |
+
"id": "unique_identifier",
|
| 71 |
+
"source": "synthetic_coding_dataset_v1",
|
| 72 |
+
"category": "code_generation",
|
| 73 |
+
"language": "Python",
|
| 74 |
+
"difficulty": "intermediate",
|
| 75 |
+
"conversations": [
|
| 76 |
+
{"from": "human", "value": "Write a function that..."},
|
| 77 |
+
{"from": "gpt", "value": "Here is the implementation..."}
|
| 78 |
+
],
|
| 79 |
+
"metadata": {
|
| 80 |
+
"task_type": "code_generation",
|
| 81 |
+
"has_code": true,
|
| 82 |
+
"tokens_approx": 1234
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
### Field Descriptions
|
| 88 |
+
|
| 89 |
+
| Field | Type | Description |
|
| 90 |
+
|---|---|---|
|
| 91 |
+
| `id` | `string` | Unique identifier for the entry |
|
| 92 |
+
| `source` | `string` | Dataset source identifier (always `synthetic_coding_dataset_v1`) |
|
| 93 |
+
| `category` | `string` | One of the 10 task categories listed above |
|
| 94 |
+
| `language` | `string` | Programming language for the task |
|
| 95 |
+
| `difficulty` | `string` | One of: `beginner`, `intermediate`, `advanced`, `expert` |
|
| 96 |
+
| `conversations` | `array` | Array of message objects with `from` (`human`/`gpt`) and `value` fields |
|
| 97 |
+
| `metadata.task_type` | `string` | Mirrors the `category` field |
|
| 98 |
+
| `metadata.has_code` | `boolean` | Whether the response contains code blocks |
|
| 99 |
+
| `metadata.tokens_approx` | `integer` | Approximate token count for the entry |
|
| 100 |
+
|
| 101 |
+
## Dataset Structure
|
| 102 |
+
|
| 103 |
+
The dataset is distributed as 63 JSONL part files:
|
| 104 |
+
|
| 105 |
+
```
|
| 106 |
+
data/
|
| 107 |
+
├── coding_dataset_part_001.jsonl
|
| 108 |
+
├── coding_dataset_part_002.jsonl
|
| 109 |
+
├── ...
|
| 110 |
+
└── coding_dataset_part_063.jsonl
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
> **Note:** Two part files (043 and 050) are empty (0 bytes) and can be safely ignored.
|
| 114 |
+
|
| 115 |
+
## Usage
|
| 116 |
+
|
| 117 |
+
### Loading with Hugging Face Datasets
|
| 118 |
+
|
| 119 |
+
```python
|
| 120 |
+
from datasets import load_dataset
|
| 121 |
+
|
| 122 |
+
dataset = load_dataset("your-username/synthetic_coding_dataset_v1", split="train")
|
| 123 |
+
print(dataset[0])
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
### Loading Manually
|
| 127 |
+
|
| 128 |
+
```python
|
| 129 |
+
import json
|
| 130 |
+
|
| 131 |
+
entries = []
|
| 132 |
+
for i in range(1, 64):
|
| 133 |
+
filepath = f"data/coding_dataset_part_{i:03d}.jsonl"
|
| 134 |
+
try:
|
| 135 |
+
with open(filepath, "r", encoding="utf-8") as f:
|
| 136 |
+
for line in f:
|
| 137 |
+
line = line.strip()
|
| 138 |
+
if line:
|
| 139 |
+
entries.append(json.loads(line))
|
| 140 |
+
except FileNotFoundError:
|
| 141 |
+
continue
|
| 142 |
+
|
| 143 |
+
print(f"Loaded {len(entries)} entries")
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
### Filtering by Language or Category
|
| 147 |
+
|
| 148 |
+
```python
|
| 149 |
+
# Filter Python entries
|
| 150 |
+
python_entries = [e for e in dataset if e["language"] == "Python"]
|
| 151 |
+
|
| 152 |
+
# Filter debugging tasks at advanced level
|
| 153 |
+
debugging_advanced = [
|
| 154 |
+
e for e in dataset
|
| 155 |
+
if e["category"] == "debugging" and e["difficulty"] == "advanced"
|
| 156 |
+
]
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
## Intended Use
|
| 160 |
+
|
| 161 |
+
This dataset is designed for:
|
| 162 |
+
|
| 163 |
+
- **Instruction tuning** of code-generation language models in the ~2B parameter range
|
| 164 |
+
- **Fine-tuning** existing base models for coding tasks
|
| 165 |
+
- **Research** on multi-language code understanding and generation
|
| 166 |
+
- **Benchmarking** code model performance across languages and difficulty levels
|
| 167 |
+
|
| 168 |
+
## Limitations
|
| 169 |
+
|
| 170 |
+
- This is a **synthetically generated** dataset. While it covers a broad range of coding tasks, it may not fully represent the complexity and nuance of real-world developer interactions or production codebases.
|
| 171 |
+
- The responses are generated by an AI model and may occasionally contain suboptimal solutions, outdated APIs, or minor inaccuracies.
|
| 172 |
+
- The dataset has not been manually verified at scale; users are encouraged to perform their own quality filtering based on their specific requirements.
|
| 173 |
+
|
| 174 |
+
## License
|
| 175 |
+
|
| 176 |
+
This dataset is released under the **MIT** license.
|
| 177 |
+
|
| 178 |
+
## Acknowledgements
|
| 179 |
+
|
| 180 |
+
Generated using large language models for synthetic data creation. Designed to support open-source code model training and research.
|