Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
code
ArXiv:
Libraries:
Datasets
Dask
License:

Latest version of The Stack

#7
by lvwerra - opened
BigCode org

This thread serves as a communication channel to inform the community about the latest version of The Stack.

yjernite pinned discussion

In my opinion, this is the most comprehensive and high-performing code dataset available. I started with a reduced version of the original dataset and then enriched it with high-quality and security-focused code samples, expanding it to approximately 1.4TB in size. This makes it ideally suited for training competitive AI models capable of advanced code generation.

Overview
The Stack Enriched (Sample Edition) is a curated and enhanced subset of the original Stack dataset, designed to provide high-quality, diverse, and well-annotated code for modern AI and code generation tasks.

  1. General Structure
    The dataset contains approximately 888 main categories (top-level directories).
    It includes both the original content and newly enriched categories.
  2. Main Enriched Categories
    Emerging Languages

Rust: Enriched with ~20,000 code files.
Go: Enriched with ~20,000 code files.
TypeScript: Enriched with ~20,000 code files.
Modern Frameworks

React: 10,000 enriched files (100% complete).
TensorFlow: 3,130 enriched files (100% complete).
PyTorch: 218 enriched files (100% complete).
Annotated Code

Python: 10,000 well-commented files (100% complete).
JavaScript: 10,000 well-commented files (100% complete).
Java: 10,000 well-commented files (100% complete).
Refactoring

25 total refactoring examples, including common patterns for Python and JavaScript.
Security

Real-world vulnerability and fix examples, covering Python, JavaScript, Java, C#, and PHP.
Optimization

Performance optimization examples, including Python list comprehensions, vectorized operations, and efficient data structures.
3. Language Distribution
The dataset now features a more balanced distribution of programming languages, with increased representation of:

Emerging languages: Rust, Go, TypeScript
Well-commented traditional languages: Python, JavaScript, Java
Modern frameworks: React, TensorFlow, PyTorch
4. Code Quality
The enrichment process has significantly improved code quality:

Higher proportion of well-commented code (at least 15% comments)
Refactoring examples demonstrating best programming practices
Security examples highlighting common vulnerabilities and their fixes
Optimization examples showing how to improve code performance
5. Diversity of Contexts
The dataset now includes a broader range of programming contexts:

Modern web development (React)
Machine learning and AI (TensorFlow, PyTorch)
Cybersecurity
Performance optimization
Refactoring and code improvement
6. Value for Model Training
The enriched dataset is significantly more valuable for training code generation models:

Better representation of modern languages and frameworks
Greater emphasis on high-quality, well-documented code
Inclusion of security and optimization patterns
Refactoring examples to help models learn code improvement
Conclusion
The enriched dataset represents a significant improvement over the original, with greater diversity, quality, and representativeness of modern code. This should result in more effective code generation models capable of:

Generating code in emerging languages
Using modern frameworks
Producing well-commented and documented code
Identifying and fixing security vulnerabilities
Optimizing code performance
Suggesting refactoring to improve code quality

Sign up or log in to comment