PiCo-DATA-code / README.md
ArcOffical's picture
Update README.md
35d4c55 verified
|
Raw
History Blame Contribute Delete
5.82 kB
metadata
language:
  - code
license: apache-2.0
task_categories:
  - text-generation
tags:
  - code
  - coding
  - synthetic
  - instruction-tuning
  - sharegpt
  - alpaca
  - multi-language
  - 2b-model
  - fine-tuning
size_categories:
  - 1M<n<10M

Synthetic Coding Dataset v1

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.

Dataset Summary

Property Value
Total Entries ~1,500,000
Total Size ~4.48 GB
Format JSONL (63 part files)
Schema ShareGPT/Alpaca hybrid (conversations array)
Languages 22 programming languages
Task Categories 10 types
Difficulty Levels 4 (beginner to expert)
Generated 2026-06-22

Supported Languages

Python, JavaScript, TypeScript, Java, C++, Go, Rust, C#, Ruby, PHP, Kotlin, Swift, Scala, C, Lua, Julia, Elixir, Haskell, OCaml, Dart, R, Bash

Task Categories

Category Description
code_generation Write functions, classes, and complete programs
debugging Find and fix bugs in existing code
explanation Explain programming concepts and code behavior
refactoring Improve code quality, readability, and structure
algorithm Implement classic and advanced algorithms
system_design Design scalable systems and architectures
code_review Review and critique code for issues
best_practices Language-specific idioms and best practices
design_pattern Explain and implement design patterns
data_structure Implement and manipulate data structures

Difficulty Levels

  • beginner — Basic syntax, simple loops, conditionals, and introductory concepts
  • intermediate — Standard design patterns, common algorithms, and typical development tasks
  • advanced — Complex algorithms, performance optimization, and non-trivial problem solving
  • expert — System design, architecture decisions, and large-scale engineering challenges

Data Format

Each line in the JSONL files is a JSON object with the following structure:

{
  "id": "unique_identifier",
  "source": "synthetic_coding_dataset_v1",
  "category": "code_generation",
  "language": "Python",
  "difficulty": "intermediate",
  "conversations": [
    {"from": "human", "value": "Write a function that..."},
    {"from": "gpt", "value": "Here is the implementation..."}
  ],
  "metadata": {
    "task_type": "code_generation",
    "has_code": true,
    "tokens_approx": 1234
  }
}

Field Descriptions

Field Type Description
id string Unique identifier for the entry
source string Dataset source identifier (always synthetic_coding_dataset_v1)
category string One of the 10 task categories listed above
language string Programming language for the task
difficulty string One of: beginner, intermediate, advanced, expert
conversations array Array of message objects with from (human/gpt) and value fields
metadata.task_type string Mirrors the category field
metadata.has_code boolean Whether the response contains code blocks
metadata.tokens_approx integer Approximate token count for the entry

Dataset Structure

The dataset is distributed as 63 JSONL part files:

data/
├── coding_dataset_part_001.jsonl
├── coding_dataset_part_002.jsonl
├── ...
└── coding_dataset_part_063.jsonl

Note: Two part files (043 and 050) are empty (0 bytes) and can be safely ignored.

Usage

Loading with Hugging Face Datasets

from datasets import load_dataset

dataset = load_dataset("your-username/synthetic_coding_dataset_v1", split="train")
print(dataset[0])

Loading Manually

import json

entries = []
for i in range(1, 64):
    filepath = f"data/coding_dataset_part_{i:03d}.jsonl"
    try:
        with open(filepath, "r", encoding="utf-8") as f:
            for line in f:
                line = line.strip()
                if line:
                    entries.append(json.loads(line))
    except FileNotFoundError:
        continue

print(f"Loaded {len(entries)} entries")

Filtering by Language or Category

# Filter Python entries
python_entries = [e for e in dataset if e["language"] == "Python"]

# Filter debugging tasks at advanced level
debugging_advanced = [
    e for e in dataset
    if e["category"] == "debugging" and e["difficulty"] == "advanced"
]

Intended Use

This dataset is designed for:

  • Instruction tuning of code-generation language models in the ~2B parameter range
  • Fine-tuning existing base models for coding tasks
  • Research on multi-language code understanding and generation
  • Benchmarking code model performance across languages and difficulty levels

Limitations

  • 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.
  • The responses are generated by an AI model and may occasionally contain suboptimal solutions, outdated APIs, or minor inaccuracies.
  • The dataset has not been manually verified at scale; users are encouraged to perform their own quality filtering based on their specific requirements.

License

This dataset is released under the MIT license.

Acknowledgements

Generated using large language models for synthetic data creation. Designed to support open-source code model training and research.