---
title: KodCode-V1
canonical_url: "https://www.modelscope.cn/datasets/AI-ModelScope/KodCode-V1"
md_url: "https://www.modelscope.cn/datasets/AI-ModelScope/KodCode-V1.md"
repository: AI-ModelScope/KodCode-V1
last_updated: 2025-03-17
license: "Apache License 2.0"
storage_size: "2.5 GB"
downloads: 2661
stars: 1
---

# KodCode-V1

> KodCode-V1 - AI-ModelScope 在 ModelScope 开源的数据集。🐱 KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Coding

AI-ModelScope/KodCode-V1 是 ModelScope 魔搭社区上的数据集，存储大小 2.5 GB，采用 Apache License 2.0 许可。

- **Repository**: AI-ModelScope/KodCode-V1
- **License**: Apache License 2.0
- **Storage size**: 2.5 GB
- **Downloads**: 2661
- **Stars**: 1
- **Last updated**: 2025-03-17

Source: https://www.modelscope.cn/datasets/AI-ModelScope/KodCode-V1

---

# 🐱 KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Coding

KodCode is the largest fully-synthetic open-source dataset providing verifiable solutions and tests for coding tasks. It contains 12 distinct subsets spanning various domains (from algorithmic to package-specific knowledge) and difficulty levels (from basic coding exercises to interview and competitive programming challenges). KodCode is designed for both supervised fine-tuning (SFT) and RL tuning.

- 🕸️ [Project Website](https://kodcode-ai.github.io/) - To discover the reasoning for the name of KodCode 🤨
- 📄 [Technical Report](https://arxiv.org/abs/2503.02951) - Discover the methodology and technical details behind KodCode
- 💾 [Github Repo](https://github.com/KodCode-AI/kodcode) - Access the complete pipeline used to produce KodCode V1
- 🤗 HF Datasets:
  - [KodCode-V1 (For RL)](https://huggingface.co/datasets/KodCode/KodCode-V1) [You are here!];
  - [KodCode-V1-SFT-R1 (for SFT)](https://huggingface.co/datasets/KodCode/KodCode-V1-SFT-R1);
  - [KodCode-V1-SFT-4o (for SFT)](https://huggingface.co/datasets/KodCode/KodCode-V1-SFT-4o).

![KodCode](https://kodcode-ai.github.io/static/images/kodcode-pipeline.jpg)

✨ Update `v1.1`: Support a new `Online Judge` style!

## 📊 Dataset Details

### Subsets
- Prefill (Simple Coding Questions, 43K)
- Leetcode (Coding Assessment Questions, 27K)
- Codeforces (Coding Assessment Questions, 33K)
- Apps (Coding Assessment Questions, 21K)
- Taco (Coding Assessment Questions, 81K)
- Code Contests (Coding Assessment Questions, 36K)
- Algorithm (DSA Knowledge, 31K)
- Data Structure (DSA Knowledge, 34K)
- Docs (Technical Documentations, 43K)
- Filter (Others, 77K)
- Package (Others，7K)
- Evol (Others, 13K)

### Data Formats
- `version`: KodCode version. Currently we have `v1.0` and an `v1.1` with online judge style questions.
- `style`: Instruct / Complete / Online Judge. Instruct provides question in natural language. Complete provides function signatures and test examples. Online Judge is converted from Instruct, which employs `stdio`.
- `subset`: As mentioned above.
- `conversation_id`: Unique question identifier in KodCode.
- `question`: Synthesized coding question.
- `solution`: Verified implementation generated by `gpt-4o-0513`.
- `test`: Unit tests generated by `gpt-4o-0513`. Paired with `solution`. Tests for Instruct & Complete styles are formatted in `Pytest`. Tests for Online Judge are formatted in `stdio`. You can transform the string to dictionary via `ast.literal_eval(test)`.
- `test_info`: Contains function name, parameter list, declaration, and docstring. If you are doing RL, you are suggested to include this information in the prompt.
- `gpt_pass_sequence`: We generate solution-test pairs up to 10 times. A value of 1 indicates the solution passed self-verification via unit tests on that trial, while 0 indicates failure.
- `gpt_pass_trial_num`: Number of trials that passed self-verification.
- `gpt_pass_percentage`: Percentage of passing trials relative to total trials.
- `gpt_difficulty`: Question difficulty level derived from `gpt_pass_percentage`.
- `trials`: Detailed information for each trial, including coverage statistics generated by `Pytest`.
- `metadata`: Contains seed information for internal debugging purposes.
- `benchmark_similarity`: Maximum cosine similarity between this question and all questions from HumanEval, MBPP, BigCodeBench, and LiveCodeBench.
- `filter_reason`: For questions labeled `use_with_caution`, explains why the question was filtered based on our pre-determined rules.

## 🧐 Other Information

**License**: Please follow [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.en).

**Contact**: Please contact [Zhangchen](mailto:zxu9@uw.edu) by email.

## 📚 Citation

If you find the data or code useful, please cite:
```
@article{xu2025kodcode,
      title={KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Coding}, 
      author={Zhangchen Xu and Yang Liu and Yueqin Yin and Mingyuan Zhou and Radha Poovendran},
      year={2025},
      eprint={2503.02951},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2503.02951}, 
}
```
