FAQ

Code

Code datasets for training and evaluating LLMs

Source corpora and instruction data for programming — plus the licence question that is unavoidable with code.

Code is the modality where training data licensing is most explicit, because source files carry their own licences and those licences have conditions.

The training data on this list comes in two kinds. Raw source corpora, for pretraining or continued pretraining on a language or ecosystem. And instruction data pairing a request with working code, for teaching a model to write to a specification. Execution-based benchmarks, where correctness is determined by running tests rather than by comparing text, are a third kind and are not covered here; they are what makes this the category where verifiable-reward training works best.

The licence issue is structural rather than incidental. A corpus scraped from public repositories contains files under many different licences, some of them copyleft with conditions on derivative works. The better datasets filter by licence and say which they kept; the weaker ones report a dataset-level licence that cannot actually describe the contents. If you intend to ship a code model, that filtering is the property to look for.

A three-step horizontal pipeline. Step one scrapes pull requests from popular Python repositories; step two filters to pull requests that resolve an issue and that add or change tests; step three, an execution filter, keeps only instances that install successfully and whose pull request passes all tests.
How raw pull requests become an execution-verified benchmark: scrape, filter on attributes, then keep only instances whose tests fail before the reference patch and pass after it. That last filter makes the dataset gradeable by running it. Image: princeton-nlp/SWE-bench · MIT repository · from “SWE-bench: Can Language Models Resolve Real-World GitHub Issues?”, arXiv:2310.06770
DatasetModalitySizeLicenceBest for
StackLite - Stack Overflow Question Dataset (2016)Text12M questionsCC BY-SAAnalysing how questions evolve by tag
SOAR ARC Train 5MText5M examplesMITSelf-improving program synthesis models
StackSampleText1,264,216 questionsCC BY-SA 3.0Automatic tag generation or recommendation
OpenCodeReasoningText735,255 examplesCC BY 4.0Reasoning models for code generation
OpenCoder SFT Stage 2Text436,000 examplesMITGenerate accurate functional Python code
Magicoder OSS Instruct 75KText75,000 instructionsMITRespond to technical or programming requests
React Code InstructionsText74,428 entriesMITGenerative models for React front-end code
Rust: Java Test - Code comparison datasetText68,167 linesMITRust–Java code translation or generation
Titanium 2.1 - DevOps Dataset and LLM Model ArchitectureText31,700 promptsApache 2.0LLM performance on concrete DevOps tasks
Tachibana 2 - Code Reasoning with DeepSeek R1Text27,261 pairsApache 2.0Reasoning about programming logic
GitHub Code SnippetsText97M snippetsUnclear — see belowLLMs for code generation or completion
GitHub AI Project DocsText3,296 documentsResearch onlyLLM handling of technical documents
Licences in this shortlist — computed from the 12 datasets below. Red marks licences that are unclear or restricted; amber marks non-commercial, share-alike or mixed terms.
A pipeline diagram. A box of open-source files (PosNeg.py, Log.cpp, Program.cs and others) feeds a seed code snippet defining get_clean_review with a regular expression; a prompt asks a language model to gain inspiration from the snippet to create a programming problem; the model outputs a generated problem about preprocessing and classifying movie reviews, and a generated solution using scikit-learn's TfidfVectorizer.
How Magicoder OSS Instruct 75K was built: a fragment of real repository code seeds a prompt, and a language model writes a problem and a solution around it. The instructions are model-written, but each one grew from someone's source file, which is why a code dataset's provenance is worth reading past its headline licence. Image: ise-uiuc/magicoder · MIT repository · from “Magicoder: Empowering Code Generation with OSS-Instruct”, arXiv:2312.02120
№ 01

StackLite - Stack Overflow Question Dataset (2016)

Text
Size
Over 12 million CSV/SQLite questions, with associated metadata
Licence
Creative Commons Attribution-ShareAlike (CC BY-SA)

Metadata for over 12 million Stack Overflow questions up to October 2016 in CSV and SQLite, including identifiers, dates, scores, tags and answer counts. Metadata only, with no question or answer bodies.

What to train on it

Analysing how questions evolve by tag over time, studying correlations between tags and scores, and exploring publishing trends by day of week.

Source: innovatiana.com

№ 02

SOAR ARC Train 5M

Text
Size
Around 5 million examples, solutions in Python code, JSON format or similar
Licence
MIT

Around five million Python programs addressing the ARC benchmark, in JSON or similar, where failed solution attempts are relabelled against the outputs they do produce and recycled as training data. A self-improvement corpus.

What to train on it

Training self-improving program synthesis models, testing evolutionary learning on complex reasoning, and fine-tuning on algorithmic problem solving in Python.

Source: innovatiana.com

№ 03

StackSample

Text
Size
1,264,216 questions, 2,014,516 answers and 3,750,994 tag rows in three CSV tables
Licence
CC-BY-SA 3.0

A 10 percent sample of Stack Overflow in three CSV tables: 1,264,216 questions, 2,014,516 answers and 3,750,994 tag rows. The relational structure supports tag prediction and question-quality modelling.

What to train on it

Training automatic tag generation or recommendation, predicting question success from text, and analysing technology trends through Stack Overflow.

Source: innovatiana.com

№ 04

OpenCodeReasoning

Text
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)

735,255 JSON examples built from roughly 28,000 competitive programming questions, each with the question, a generated solution and metadata. NVIDIA-published and large enough for serious code-reasoning fine-tuning.

What to train on it

Training and evaluating reasoning models for code generation, improving LLM performance on complex programming problems, and supporting supervised fine-tuning.

Source: innovatiana.com

№ 05

OpenCoder SFT Stage 2

Text
Size
About 436,000 examples in four JSON subsets (instruction, code, test case)
Licence
MIT

About 436,000 JSON examples across four subsets (the two largest alone hold about 289,000) holding instruction, code and sometimes test cases, drawn from educational data, Python documentation and validated synthetic instructions. The second-stage SFT mix for OpenCoder.

What to train on it

Training models to generate accurate functional Python code, evaluating algorithmic understanding on technical prompts, and improving SFT for development agents.

Source: innovatiana.com

№ 06

Magicoder OSS Instruct 75K

Text
Size
75,000 instructions, JSON format
Licence
MIT

75,000 instruction-response pairs in JSON, generated with GPT-3.5 from real open-source project code rather than synthetic templates. Built to train software development assistance models on authentic codebase patterns.

What to train on it

Training models to respond to technical or programming requests, building assistants specialised in open-source projects, and instruction tuning on real code.

Source: innovatiana.com

A diagram in two rounded panels. 'Evolutionary Search': an ARC task feeds learned program sampling (3k prog.), then learned program refinement (6k prog.), then a majority vote that outputs the solution. 'Learning': search traces go to data selection, then to sampling and refinement LLM fine-tuning, producing a fine-tuned LLM that feeds back into the search, with dashed 'iterate' arrows between the panels.
SOAR's loop: a language model samples candidate programs for an ARC task, refines them and votes on an answer, then every search trace, failed programs included, is selected into fine-tuning data for the next round. That is where SOAR ARC Train 5M comes from: search output, with failures relabelled as solutions to the tasks they actually solve. Image (cropped): flowersteam/SOAR · MIT repository · from “Self-Improving Language Models for Evolutionary Program Synthesis: A Case Study on ARC-AGI”, arXiv:2507.14172
№ 07

React Code Instructions

Text
Size
74,428 entries, text formats + Parquet (219 MB)
Licence
MIT

74,428 LLM-generated pairs of instruction and React code in text and Parquet formats, 219 MB, covering component and application construction. Narrowly front-end focused, which is unusual among code instruction sets.

What to train on it

Fine-tuning generative models for React front-end code, creating assistants that generate web interfaces, and rapid interface prototyping from natural instructions.

Source: innovatiana.com

№ 08

Rust: Java Test - Code comparison dataset

Text
Size
68,167 lines (181 MB), text or parquet format
Licence
MIT

68,167 lines across 181 MB in text or Parquet, pairing Rust and Java tests, snippets and code for comparison work. Aimed at cross-language translation and comparative compilation study rather than single-language generation.

What to train on it

Training Rust–Java code translation or generation, evaluating compilation, security or readability across two languages, and testing programming automation.

Source: innovatiana.com

№ 09

Titanium 2.1 - DevOps Dataset and LLM Model Architecture

Text
Size
31,700 prompt/response pairs, in JSON format
Licence
Apache 2.0

31,700 synthetic JSON prompt-and-response pairs on software architecture, DevOps and cloud scenarios, with answers generated by DeepSeek R1. One of very few open datasets targeting infrastructure reasoning specifically.

What to train on it

Evaluating LLM performance on concrete DevOps tasks, training models for cloud infrastructure and automation, and testing software architecture reasoning.

Source: innovatiana.com

№ 10

Tachibana 2 - Code Reasoning with DeepSeek R1

Text
Size
27,261 quick-response pairs, 203 MB (Parquet), structured text
Licence
Apache 2.0

27,261 synthetically generated prompt-and-response pairs in structured text, 203 MB of Parquet, with answers produced by DeepSeek R1 and focused on programming reasoning rather than code completion alone.

What to train on it

Evaluating an LLM's ability to reason about programming logic, testing errors generated by very large models, and refining coding-assistant models.

Source: innovatiana.com

№ 11

GitHub Code Snippets

Text
Size
97 million snippets, text formats (JSON or plain), multi-languages (Python, JS, etc.)
Licence
Labelled CC BY 4.0 by the uploader; the snippets come from GitHub repositories under their own licences

Over 97 million open-source code snippets in JSON or plain text, drawn from GitHub repositories with more than 10,000 stars, spanning Python, JavaScript, Java, C++, Go and Rust. The star threshold filters for quality, not for licence: the CC BY 4.0 tag is the uploader's, and each snippet stays under its repository's own licence.

What to train on it

Training LLMs for code generation or completion, creating Copilot-style development assistants, and analysing common code styles and syntactic structures.

Source: innovatiana.com

№ 12

GitHub AI Project Docs

Text
Size
3,296 documents, 18M characters, .md and .rst formats
Licence
Apache 2.0 (source repositories); the card provides the data solely for research and evaluation purposes

3,296 documents totalling 18 million characters in Markdown and reStructuredText, collecting README files, configuration guides and other technical documentation from popular open-source AI projects on GitHub. The card provides it solely for research and evaluation and tells users to check each repository's licence.

What to train on it

Testing LLM handling of technical documents in real contexts, training on structured Markdown content, and creating agents that summarise or restructure READMEs.

Source: innovatiana.com

A line chart of pass@1 on LiveCodeBench (25 to 65) against the number of training samples on a log scale from 25,000 to 736,000, for 7B, 14B and 32B models, each with a dashed horizontal line for the R1-Distill model of the same size. All three lines rise steadily.
LiveCodeBench pass@1 for Qwen models of three sizes fine-tuned on 25,000 to 736,000 OpenCodeReasoning samples. All three keep improving as the set grows; the 7B model gains most, from about 23 to about 50, and passes the matching R1-Distill model (dashed line) only beyond about 200,000 samples. Image: Figure 3 of the paper · CC BY 4.0 · from Ahmad et al. 2025, “OpenCodeReasoning: Advancing Data Distillation for Competitive Coding”, arXiv:2504.01943

How this list was put together

Drawn from the datasets in Dataset Finder filed under this topic, then checked by hand against what this page covers. A tag is a filing decision, not a description, so records that carried the tag without being about the topic were removed, and relevant records filed elsewhere were added. The order puts the closest fit first.

Sizes and licences come from each dataset's own documentation, vague wording included. Where we found a re-upload or catalogue card stating a licence that the original release contradicts — a CC0 tag on Flickr photographs, MIT on data whose terms require a signed agreement — the entry gives the original terms and says so. The comparison table abbreviates licences; hover a cell for the full wording.

Stop hunting. Start searching.

The datasets listed on this page are in Dataset Finder, alongside tens of thousands more — searchable in plain language.

Search Dataset Finder →