Data: pretrain and mid-train
Raw code, cleaned and mixed. Where a model learns what code looks like.
Who needs this
Most useful if you train from scratch or continue pretraining. If you only have a few GPUs, you will mostly use this stage to borrow a filtered subset or to understand what your base model already saw.
Decisions you will make
- Continue pretraining a good open base model, or start from scratch. For almost everyone the first option wins on cost: a strong open code base model already carries most of the signal.
- How much to filter. Quality filters (educational or textbook-style classifiers, license filters, deduplication) usually pay back more than adding raw volume.
- Whether to add a short high-quality annealing or mid-training phase (synthetic, reasoning-heavy, repo-level data) at the end of pretraining.
Pitfalls
- Near-duplicate files inflate benchmark scores and waste tokens. Deduplicate at file and repository level before you train.
- Benchmark contamination: remove problems and solutions from your eval sets from the training mix, then confirm with a held-out or post-cutoff eval.
- Licenses are per file. A corpus being open to download does not mean every file in it is permissively licensed. Read the card and keep the license metadata.
Datasets 30
CommitPack
Raw commit corpus (code before/after plus message) from which CommitPackFT was filtered.
Common Pile: Stack v2 (openly licensed)
Stack v2 filtered to openly licensed repos (all detected licenses on the Blue Oak list), part of the Common Pile v0.1 for license-clean pretraining.
Common Pile: Stack v2 edu filtered
Educational-quality subset of the openly licensed Stack v2 used for Comma v0.1.
Cosmopedia
Large synthetic textbooks, blog posts and stories generated from seed web data; includes code-flavored subsets used in SmolLM pretraining.
Dolma 3 Dolmino mix (100B)
Ai2 OLMo 3 mid-training mix with fill-in-the-middle Stack-Edu, synthetic Python (CraneCode) and code meta-reasoning data.
FineMath
High-quality math web pages with step-by-step reasoning, used with code in SmolLM2 mid-training.
GitHub Code (CodeParrot)
BigQuery-derived GitHub dump with repo, path, language and license per file; used for CodeParrot.
GitHub Code Clean
Filtered github-code: average line length under 100, alphanumeric fraction over 0.25 and autogenerated files removed.
GitHub Jupyter parsed
Jupyter notebooks parsed to markdown (as text) and Python code cells only.
H4 Stack Exchange preferences
Stack Overflow questions with at least two scored answers, built for preference-model training and usable for LM training.
Jupyter code-text pairs
Pairs of notebook markdown and code from Jupyter notebooks (BigCode).
Nemotron-CC-Code-v1
NVIDIA's code-from-web pretraining set: code-related pages from Common Crawl, reprocessed for training; part of the Nemotron pretraining family.
Nemotron-Pretraining-Code-v1
Code part of NVIDIA's Nemotron Nano 2 pretraining data: LLM-synthesized code and metadata for a permissively licensed GitHub subset.
Nemotron-Pretraining-Code-v2
Second Nemotron code pretraining release: more GitHub metadata plus synthetic code data.
Nemotron-Pretraining-Code-v3 (metadata)
Incremental metadata list of permissively licensed GitHub files for Nemotron 3 Ultra pretraining; use with v1/v2.
OpenCoder annealing corpus
Annealing-phase data of OpenCoder: algorithm-related code from The Stack v2 plus synthetic rewrites and synthetic QA seeded from it.
OpenCoder FineWeb code corpus
Code-related web pages recalled from FineWeb with a trained fastText-style recall pipeline (url, tag, text, file_path, dump fields).
OpenCoder FineWeb math corpus
Math-related web pages recalled from FineWeb, used alongside code in OpenCoder pretraining.
OpenWebMath
Math web documents extracted from Common Crawl with LaTeX preserved; used in StarCoder2 and many mixes.
RefineCode (metadata)
Repo and path metadata to reproduce OpenCoder's RefineCode pretraining corpus, which applies 130+ language-specific heuristic rules.
SmolLM-Corpus (Python-Edu, Cosmopedia, FineWeb-Edu-Dedup)
Pretraining corpus of SmolLM v1 including Python-Edu: Python files scored 4 or more by an educational code classifier.
Stack-Edu
Educational-quality subset of StarCoder2Data, selected with language-specific classifiers (score and int_score columns), built for SmolLM2. Ships blob ids, not file text.
StarCoder2 data extras
The non-code parts of the StarCoder2 mix: arXiv, GitHub issues, Stack Overflow, Wikipedia, Kaggle notebooks, docs, LLVM IR and OpenWebMath.
StarCoderData
The StarCoder (v1) training set: filtered code from The Stack plus GitHub issues, commits and Jupyter, in ready-to-train form.
The Stack GitHub issues
GitHub issue and discussion text collected for StarCoder-era training.
The Stack v1
First BigCode corpus of permissively licensed GitHub code (2022 cutoff), used for StarCoder and SantaCoder.
The Stack v2
StarCoder2 training corpus built on the Software Heritage archive (2023), with per-file license labels. The HF release holds metadata and SWH blob ids; contents come from the SWH S3 bucket.
The Stack v2 (dedup)
Near-deduplicated variant of The Stack v2 (metadata plus SWH blob ids) for building custom training mixes.
The Stack v2 train (smol ids)
Id list for the smaller training subset of The Stack v2 used in StarCoder2 training; a lightweight route to a few-hundred-billion-token mix.
The Stack v3 (train)
Successor to The Stack v2: a direct GitHub crawl (cutoff 2025-08-07) with file contents inline, grouped by repository, near-deduplicated, quality filtered and PII redacted. Built for repo-level code pretraining.
Models 11
Code Llama 70B (legacy)
Meta's 2024 code Llama; included for historical comparison only.
Codestral-22B-v0.1
Mistral's 2024 code model; weights open for research and testing only.
DeepSeek-Coder-V2 (Instruct 236B / Lite)
June 2024 MoE code model continued-pretrained from DeepSeek-V2; strong at release, now legacy.
Granite Code 8B Base
IBM enterprise-oriented code model trained on license-permissive data; legacy but cleanly licensed.
Olmo 3 32B (Base/Think)
Fully open (weights, data, checkpoints incl. stage1/2/3) Allen AI model suite with Base, Instruct and Think; best for transparent post-training research. No dedicated 'OLMo-Coder' was found.
OpenCoder-8B (Base/Instruct)
Fully transparent code LLM: weights plus data pipeline, ablations and training protocol released. Best choice for studying code pretraining and annealing recipes end to end.
Qwen2.5-Coder family (32B shown)
Sep-Nov 2024 code-specialized Qwen family with base and instruct variants from 0.5B to 32B. Still the most widely used open base for code SFT/RL recipes (SWE-smith, OpenHands LM, Open-R1 style work).
Qwen3-Coder-Next (and -Base)
Open-weight coding-agent model from Jan 2026 built for local agents (80B total, 3B active). A Base variant is published for further post-training.
Seed-Coder-8B (Base/Instruct/Reasoning)
ByteDance Seed (2025) family built from model-curated pretraining data; base, instruct and RL-trained reasoning variants in one permissive license.
SmolLM3-3B
Fully open 3B model with dual-mode reasoning; handy as a tiny testbed for code recipes (see smollm repo).
StarCoder2-15B
Open pretrained code model trained on The Stack v2 with opt-outs excluded; the data and training are documented.
Papers 9
DeepSeek-Coder
Repo-level pretraining data construction (dependency-ordered files) and fill-in-the-middle for code models.
DeepSeek-Coder-V2
Continued pretraining of a MoE on code and math tokens to reach closed-model-level code results at release.
OpenCoder: The Open Cookbook
Releases weights plus reproducible data pipeline, ablations and training protocol for a top-tier code LLM at its release.
Qwen2.5-Coder Technical Report
Describes data, training and evaluation for the Qwen2.5-Coder family.
Rho-1: Not All Tokens Are What You Need
Selective language modeling: train on tokens with high excess loss versus a reference model.
Seed-Coder
Model-centric pipeline: LLMs score and filter code pretraining data instead of hand rules.
SmolLM2 (Stack-Edu)
Data-centric small-model training; introduces Stack-Edu (education-quality code filter), FineMath, SmolTalk and manual mix refinement.
StarCoder 2 and The Stack v2
Documents the open data, opt-out and training for StarCoder2 on The Stack v2.
Textbooks Are All You Need (phi-1)
1.3B model trained on 6B tokens of filtered web 'textbook quality' code plus 1B tokens of synthetic textbooks reaches 50.6% HumanEval (abstract).
