OpenCodeReasoning
Large dataset containing competitive programming questions in Python, with coded solutions, intended for fine-tuning models.
735,255 examples in JSON structured text, Python source code, questions and solutions
Creative Commons Attribution 4.0 International (CC BY 4.0)
Description
The dataset OpenCodeReasoning contains over 735,000 examples based on 28,319 unique competitive programming questions in Python. Each example contains the question, the generated solution, and associated metadata.
What is this dataset for?
- Train and evaluate reasoning models for automatic code generation
- Improving the performance of LLMs on complex programming problems
- Support supervised fine-tuning (SFT) for automated software development applications
Can it be enriched or improved?
Yes, you can add additional complexity annotations, or integrate automatic execution tests. The dataset can be supplemented by other question sources or languages.
🔎 In summary
🧠 Recommended for
- NLP researchers
- Code generation model developers
- AI software teams
🔧 Compatible tools
- Hugging Face Datasets
- PyTorch
- TensorFlow
- Python code parsing tools
💡 Tip
Integrate unit tests to validate the solutions generated during training.
Frequently Asked Questions
What competitive programming platforms are covered by this dataset?
CodeForces, AtCoder, CodeChef, CodeChef, HackerRank, LeetCode, among others, with over 28,000 unique questions collected.
Is this dataset suitable for commercial use?
Yes, the CC-BY 4.0 license allows commercial use under attribution.
Can this dataset be used to train models in other programming languages?
This dataset is focused on Python, but the methodology can be adapted for other languages through additional collection and annotation.




