By clicking "Accept", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. See our Privacy Policy for more information
Open Datasets
OpenCodeReasoning
Text

OpenCodeReasoning

Large dataset containing competitive programming questions in Python, with coded solutions, intended for fine-tuning models.

Download dataset
Size

735,255 examples in JSON structured text, Python source code, questions and solutions

Licence

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

Criterion Evaluation
🧩Ease of Use ⭐⭐⭐⭐☆ (clear JSON format, requires coding and NLP knowledge)
🧼Cleaning Required ⭐⭐⭐⭐☆ (low: well-structured and annotated data)
🏷️Annotation Richness ⭐⭐⭐⭐☆ (code, question, solution, diverse metadata)
📜Commercial License ✅ Yes (CC-BY 4.0)
👨‍💻Ideal for Beginners ⚠️ Moderate – useful for users with basic NLP/coding knowledge
🔁Reusable for Fine-Tuning 🔥 Perfect for fine-tuning on code generation and algorithmic reasoning
🌍Cultural Diversity 🌐 Multi-source, focused on international competitive programming

🧠 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.

Similar datasets

See more
Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.