Dataset
GitHub Code Clean
Open on Hugging FaceHugging Face · relatedcloud.google.com · relatedHugging Face · relatedMarkdown · JSON · BibTeX
Summary
Filtered GitHub code pretrain (avg line length, alphanumeric fraction, autogen drop) as a cleaner sibling of codeparrot/github-code
- Source
- huggingface
- Access
- Free
- License
- Apache-2.0 (HF card YAML) for the packaging/script. Per-file content licenses are the 15 repo licenses in the license column (script DatasetInfo.license: 'Multiple: see the license field of each sample'). Copyleft GPL/AGPL/LGPL files are included if you load all-all.
- License family
- Permissive
- Added
- Aug 14, 2026
- Verified
- Aug 14, 2026
From the source
- Repository
- codeparrot/github-code-clean
- Created
- Jun 29, 2022
- Last updated
- Jul 5, 2022
- Downloads (last month)
- 29,717
- Likes
- 144
- Size
- 10M to 100M rows
- Modalities
- text
Topics
source-code pre-training; 30 programming languages; permissively licensed GitHub files
Dataset profile
- Scale
- Card/parent 115M files / ~1TB text / parent source-size sum 873 GB. Clean README: 3.39M files removed (2.94%) → remaining ≈111.6M. github-code-clean.py 880 parquet shards data/train-00000-of-00880.parquet … train-00879 (listed train-00000 355.1 MB … train-00009 357.5 MB; train-00879 359.9 MB) → ~314 GB LFS parquet estimate (880×~357 MB; not summed). size_categories 10M<n<100M. Hub/datasets-server all-all train 614.0K / 10 parquet / 1.7 GB is a partial convert (477 failed parquet jobs) — do not catalog 614K as n. usedStorage Unknown. Hub overview 1.2M downloads / 142 likes at check. gated=false.
- Format
- parquet under data/train-*-of-00880.parquet (880 shards). Columns: code, repo_name, path, language, license, size. Hub configs are language-license products (default all-all; e.g. Python-all, all-mit). Loading script github-code-clean.py (trust_remote_code).
- Type
- Pretraining corpus / filtered GitHub source files
- License
- Apache-2.0 (HF card YAML) for the packaging/script. Per-file content licenses are the 15 repo licenses in the license column (script DatasetInfo.license: 'Multiple: see the license field of each sample'). Copyleft GPL/AGPL/LGPL files are included if you load all-all.
- Cost
- Free
- Languages
- Source-code (card language tag absent; parent language:code). 30 languages in github-code-clean.py _LANG_TO_EXTENSION (card/description says 32 — catalog script 30). Parent file-count table (approx; clean drops 2.94% Unknown-uniform): Java 19,548,190 / 107.70 GB; C 14,143,113 / 183.83 GB; JavaScript 11,839,883 / 87.82 GB; HTML 11,178,557 / 118.12 GB; PHP 11,177,610 / 61.41 GB; Markdown 8,464,626 / 23.09 GB; C++ 7,380,520 / 87.73 GB; Python 7,226,626 / 52.03 GB; C# 6,811,652 / 36.83 GB; Ruby 4,473,331 / 10.95 GB; Go 2,265,436 / 19.28 GB; TypeScript 1,940,406 / 24.59 GB; CSS 1,734,406 / 22.67 GB; Shell 1,385,648 / 3.01 GB; then Scala–Julia <1M each. Natural-language comments follow each file. No LID table.
- Modality
- Text-only (source code + markup). No images.
- Domain
- source-code pre-training; 30 programming languages; permissively licensed GitHub files
- Time period
- Parent codeparrot/github-code v1.1 BigQuery query executed 2022-03-16 18:23:39 UTC+1 (v1.0 was 2022-02-14). HF createdAt 2022-06-29; lastModified 2022-07-05. One-shot GitHub-on-BigQuery dump plus extra clean filters, not a live scrape.
- Purpose
- Filtered GitHub code pretrain (avg line length, alphanumeric fraction, autogen drop) as a cleaner sibling of codeparrot/github-code
- Used for
- CodeParrot / early code-LM pretrain. Hub overview 1.2M downloads / 142 likes at check. Distinct from already-cataloged github-code-2025 (2025 nick007x dump) and from Hub-gated bigcode/the-stack — this is the public BigQuery GitHub dump, not The Stack.
- Authors
- Hugging Face CodeParrot (loading-script copyright HuggingFace Datasets Authors). File authors are GitHub repo contributors as of the Mar 2022 BigQuery snapshot. License field is the origin repo license (15 OSS licenses), not a single dataset author.
- Bias
- Permissive-license GitHub only (15 licenses: mit/apache-2.0/gpl-3.0/gpl-2.0/bsd-3-clause/agpl-3.0/lgpl-3.0/lgpl-2.1/bsd-2-clause/cc0-1.0/epl-1.0/mpl-2.0/unlicense/isc/artistic-2.0). Java/C/JS/HTML/PHP dominate file count; C dominates bytes. Markdown/HTML/CSS are markup not compilers. Vendored node_modules still present after the 'clean' filters (preview). Distinct from already-cataloged github-code-2025 / OpenCoder FineWeb Code Corpus / SwallowCode-v2. Do not treat this as a request for gated bigcode/the-stack.
- Text quality
- Parent dropped lines >1000 chars and exact whitespace-ignoring dups. Clean adds avg line length <100, alphanumeric fraction >0.25, and autogen keyword drop (3.39M files). all-all preview row 0 is a 2,730-byte ES6 Set polyfill nested ~8 node_modules deep in a GPL-2.0 WordPress theme (Socratacom/socrata-europe …/es6-set/polyfill.js) — residual vendored JS the clean filters did not drop. Row 1 is a 266-byte ISC JS class (mshick/velvet core/classes/data.js). Residual: secrets/PII possible (parent card); 2022 snapshot; datasets-server partial 614K is not a quality sample of 111M.
- Sample size
- Single train split. Default config all-all is the full remaining ~111.6M. Language configs (Python-all, Java-all, …) and license configs (all-mit, all-apache-2.0, …) are filters — not extra n. No val/test. Do not concat with already-cataloged github-code-2025 / OpenCoder FineWeb Code Corpus. Do not add codeparrot/github-code as extra n.
- Long context
- Mixed (whole files; parent dropped lines >1000 chars; clean avg line <100). Exact token histogram Unknown. Parent 873 GB / 115M ≈ ~7.6 KB/file if both figures hold.
- Intermediate steps
- Yes (BigQuery GitHub-on-BigQuery files by extension; drop long lines + exact dups; clean: avg line <100, alnum>0.25, autogen keywords). Parent query.sql / github_preprocessing.py live on codeparrot/github-code.
- Idea quality
- High
- Novelty
- High (public ~111.6M-file / ~1TB 2022 GitHub code dump vs already-cataloged github-code-2025; Stack remains gated)
- Text conversion
- Ready parquet; load_dataset('codeparrot/github-code-clean', split='train', streaming=True) uses default all-all. ~314 GB — streaming required. Language/license filters are Hub configs, not extra n. datasets-server 501/partial 614K — do not wait on viewer. Parent codeparrot/github-code is the un-cleaned 115M — do not concat as extra n.
- Collection method
- Download
- Static
- Unknown (HF lastModified 2022-07-05; BigQuery window Mar 2022; one-shot).
- Processed
- Unknown
Research notes
- Dump-adjacent public corpus (not in data-source-dump.jsonl). gated=false; public; CuratorBote listed README (340 B), github-code-clean.py (880 shards), and data/train-00000…train-00879 parquet. Catalog remaining ≈111.6M after 3.39M clean drop / parent 115M / ~1TB, not datasets-server partial 614.0K. Cite CodeParrot github-code-clean + parent github-code (BigQuery 2022-03-16). Not in papers_local.csv. Not on the Aug 13 live Datasets sheet export. Substituted ahead of Hub-gated bigcode/the-stack / bigcode/the-stack-v2 / nvidia/Nemotron-Pretraining-Code-v1; skipped HuggingFaceTB/stack-edu (metadata-only; needs gated Stack v2) and Convence/Rust-Coder (too small). Already-cataloged github-code-2025 is a later nick007x dump — do not sum as extra n.
Related entries
- Dataset
GitHub Code 2025
A large-scale code dataset containing 148 million source code files harvested from GitHub's top 1 million repositories with 2+ stars, totaling approximately 1 TB. Each row includes the repository ID, file size, file path, and full file content, making it suitable for training code generation models and performing code analysis tasks. At least 17 models have been trained or fine-tuned on this dataset.
Similar entries
- Dataset UltraData-Code (OpenBMB L0–L3 tiered code pretrain: L2 algorithmic + L3 synthesis)
- Dataset github-top-code
- Paper Generalization Dynamics of LM Pre-training ("Discovering Mode-Hopping")
- Paper Cross-Benchmark Transfer from RL on Agentic Coding Tasks
- Paper BigO(Bench): Can LLMs Generate Code with Controlled Time and Space Complexity?
- Tool K2 Horizon data release — DATA_NAVIGATOR index and the post-training data-generation pipelines