StarCoderData
DatasetFree250GB curated code dataset for StarCoder training.
Capabilities8 decomposed
multi-language code dataset curation with near-deduplication
Medium confidenceProcesses raw code from The Stack through a multi-stage filtering pipeline that applies near-deduplication algorithms (likely MinHash or similar locality-sensitive hashing) to identify and remove near-identical code blocks across 86 programming languages, reducing redundancy while preserving language diversity. The pipeline maintains language-specific metadata and handles polyglot repositories by segmenting code by detected language before deduplication, enabling models to learn distinct patterns per language rather than memorizing duplicated snippets.
Applies language-aware near-deduplication across 86 languages simultaneously, preserving language-specific patterns while removing redundancy at scale. Most competing datasets (CodeSearchNet, GitHub-Code) either deduplicate globally (losing language nuance) or skip deduplication entirely (introducing memorization). StarCoderData's approach segments by detected language before applying LSH-based deduplication, maintaining language diversity while eliminating duplicates.
Larger and more diverse than CodeSearchNet (14M vs 6M examples) and more aggressively deduplicated than raw GitHub-Code, reducing model overfitting while covering 86 languages vs competitors' 10-20 language coverage
pii and sensitive data removal with language-aware pattern matching
Medium confidenceImplements a multi-pass filtering system that detects and redacts personally identifiable information (PII) such as API keys, email addresses, SSH keys, and credentials using language-specific regex patterns and entropy-based detection. The system applies different detection rules per language (e.g., Python docstrings vs JavaScript comments) and uses heuristics like high-entropy string detection to catch obfuscated secrets, preventing models from learning to generate real credentials or private information.
Combines language-aware pattern matching (different rules for Python vs JavaScript vs YAML) with entropy-based detection to catch both known credential formats and novel obfuscated secrets. Most datasets use simple regex or blacklist approaches; StarCoderData's multi-pass system with entropy heuristics catches credentials that basic pattern matching misses.
More comprehensive than CodeSearchNet's minimal PII filtering and more sophisticated than GitHub-Code's string-based approach, using entropy analysis to detect obfuscated secrets that pattern-only systems miss
quality filtering with code-specific heuristics
Medium confidenceApplies domain-specific quality metrics to filter low-quality code samples, using heuristics such as minimum file length, syntax validity per language, comment-to-code ratio, and indentation consistency. The system parses code using language-specific parsers (tree-sitter for 86 languages) to validate syntax and extract structural features, removing files that fail parsing, have excessive boilerplate, or show signs of generated/minified code that would add noise to model training.
Uses tree-sitter AST parsing for structural validation across 86 languages rather than simple regex or string-based heuristics, enabling detection of generated/minified code through AST patterns (e.g., unusually deep nesting, lack of meaningful identifiers). Combines syntax validity with code-specific metrics like comment ratio and indentation consistency.
More rigorous than CodeSearchNet's minimal quality checks and more language-aware than GitHub-Code's generic filtering, using AST-level analysis to detect generated code and structural anomalies that string-based approaches miss
github issues and commits inclusion with temporal metadata
Medium confidenceExtends the dataset beyond source code files to include GitHub issues (bug reports, feature requests, discussions) and commit messages, capturing natural language context and intent alongside code. The pipeline preserves temporal metadata (commit timestamps, issue creation dates) and links code changes to their associated issues/discussions, enabling models to learn the relationship between code changes and their motivations, and supporting downstream tasks like commit message generation or issue-to-code mapping.
Uniquely includes GitHub issues and commits alongside source code, with temporal linking to create code-in-context samples. Most code datasets (CodeSearchNet, GitHub-Code) focus on source files only; StarCoderData's inclusion of issues and commits enables models to learn intent and motivation, not just syntax.
Richer contextual signal than CodeSearchNet or GitHub-Code by pairing code with issue context and commit messages, enabling training of intent-aware models that understand why code was written, not just how
language-stratified dataset splits with distribution preservation
Medium confidenceConstructs train/validation/test splits that preserve the language distribution of the full dataset, ensuring each split contains representative samples from all 86 languages in proportion to their presence in the full dataset. The splitting algorithm uses stratified sampling (e.g., sklearn's StratifiedShuffleSplit adapted for multi-label scenarios) to guarantee that rare languages aren't accidentally concentrated in one split, and provides per-language statistics to enable language-specific evaluation.
Applies stratified sampling to preserve language distribution across train/val/test splits, ensuring rare languages aren't accidentally concentrated in one split. Most datasets use random splits, which can accidentally create imbalanced language distributions across splits, especially for low-resource languages.
More rigorous than random splitting for multilingual datasets, ensuring each split is representative of the full language distribution and enabling fair per-language evaluation
scalable dataset streaming and lazy loading via hugging face hub
Medium confidenceHosts the 250GB dataset on Hugging Face Hub with support for streaming and lazy loading, allowing users to load samples on-demand without downloading the entire dataset. The implementation uses Hugging Face Datasets' Arrow-backed format with efficient indexing, enabling random access to samples and support for distributed training across multiple GPUs/TPUs. The streaming interface supports filtering, sampling, and batching operations that are pushed down to the storage layer, reducing bandwidth and memory overhead.
Leverages Hugging Face Datasets' Arrow-backed format with efficient indexing and streaming support, enabling on-demand loading without full downloads. The dataset is optimized for both sequential streaming (training) and random access (sampling), with push-down filtering to reduce bandwidth.
More accessible than raw GitHub-Code (requires manual download/processing) and more flexible than CodeSearchNet (which requires full download), enabling training without local storage constraints
language-specific metadata and statistics extraction
Medium confidenceExtracts and provides rich metadata for each code sample including detected language, file size, number of functions/classes, cyclomatic complexity, and other code metrics computed via tree-sitter AST analysis. The metadata enables downstream filtering, analysis, and stratification by code characteristics, and provides statistics aggregated per language (e.g., average file size, function count distribution) to support dataset analysis and model evaluation.
Computes rich AST-based metadata (function count, complexity, etc.) for all samples using tree-sitter, enabling fine-grained analysis and filtering by code characteristics. Most datasets provide only basic metadata (language, file size); StarCoderData's structural metrics enable deeper analysis.
Richer metadata than CodeSearchNet or GitHub-Code, enabling analysis of code patterns and correlation with model performance
reproducible dataset versioning with content-addressed snapshots
Medium confidenceProvides versioned snapshots of the dataset with content-addressed identifiers (e.g., commit hashes or checksums) to ensure reproducibility and enable researchers to cite specific dataset versions. The versioning system tracks changes to filtering rules, deduplication parameters, and PII removal patterns, allowing users to understand exactly what version of the dataset was used for training and to reproduce results with the same data.
Provides content-addressed versioning with tracked changes to filtering/deduplication parameters, enabling reproducible research and comparison across dataset versions. Most datasets are static; StarCoderData's versioning enables tracking evolution and understanding impact of changes.
More reproducible than CodeSearchNet or GitHub-Code by providing explicit versioning and change tracking, enabling researchers to cite exact dataset versions and reproduce results
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with StarCoderData, ranked by overlap. Discovered automatically through the match graph.
xCodeEval
Dataset by NTU-NLP-sg. 6,96,087 downloads.
The Stack v2
67 TB permissively licensed code dataset across 600+ languages.
StarCoder Data
783 GB curated code dataset from 86 languages with PII redaction.
CulturaX
6.3T token multilingual dataset across 167 languages.
c4
Dataset by allenai. 6,98,456 downloads.
MAP-Neo
Fully open bilingual model with transparent training.
Best For
- ✓ML teams training large code models (1B+ parameters) requiring high-quality, deduplicated corpora
- ✓Researchers studying code generation across polyglot codebases
- ✓Organizations building domain-specific code models from existing open-source code
- ✓Teams training models that will be deployed in production where credential leakage is a security risk
- ✓Organizations handling code from private repositories or enterprises with strict data governance
- ✓Researchers publishing models and wanting to demonstrate responsible data practices
- ✓Teams training code models where data quality directly impacts model quality and reduces training time
- ✓Projects targeting specific code styles or patterns (e.g., idiomatic Python vs generated code)
Known Limitations
- ⚠Near-deduplication threshold is fixed and may over-deduplicate legitimate code variations (e.g., common patterns like boilerplate)
- ⚠Language detection errors in polyglot files may cause code segments to be assigned to wrong language buckets
- ⚠Deduplication is one-directional — cannot recover removed duplicates if training strategy changes
- ⚠No fine-grained control over deduplication sensitivity per language or domain
- ⚠Pattern-based detection has false negatives — obfuscated or novel credential formats may slip through
- ⚠Entropy-based detection can flag legitimate high-entropy strings (e.g., UUIDs, hashes) as secrets, requiring manual review
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
About
Curated 250GB code dataset used to train StarCoder models, filtered from The Stack with near-deduplication, PII removal, and quality filtering across 86 programming languages plus GitHub issues and commits.
Categories
Alternatives to StarCoderData
The GitHub for AI — 500K+ models, datasets, Spaces, Inference API, hub for open-source AI.
Compare →FLUX, Stable Diffusion, SDXL, SD3, LoRA, Fine Tuning, DreamBooth, Training, Automatic1111, Forge WebUI, SwarmUI, DeepFake, TTS, Animation, Text To Video, Tutorials, Guides, Lectures, Courses, ComfyUI, Google Colab, RunPod, Kaggle, NoteBooks, ControlNet, TTS, Voice Cloning, AI, AI News, ML, ML News,
Compare →Are you the builder of StarCoderData?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →