LLM-Datasets: An Open Framework for Pretraining Datasets of Large Language Models

Malte Ostendorff, Pedro Ortiz Suarez, Lucas Fonseca Lage, Georg RehmCOLM 2024

TL;DR

The paper introduces LLM-Datasets, an open-source framework designed to streamline the collection, compilation, and processing of pretraining datasets for large language models (LLMs). This framework aims to address the current gap in reproducible and accessible pretraining data, enabling researchers to focus on data composition and reuse existing resources while ensuring reproducibility. As a demonstration, they present a 2.3 trillion token multilingual dataset covering 32 European languages.

What Problem Does This Paper Address?

The rapid advancement of large language models (LLMs) has been a cornerstone of natural language processing research. While significant progress has been made in developing tools and frameworks for training, evaluation, and deployment (e.g., DeepSpeed, lm-evaluation-harness), a critical component has been largely overlooked: the pretraining datasets themselves. Many LLMs, even those claiming to be "open," lack sufficient detail about their pretraining data, making reproduction of their results difficult. This is a significant issue because pretraining data quality is increasingly recognized as a primary driver of model performance. The paper aims to fill this gap by providing a standardized, community-driven framework for managing and processing these massive datasets.

Methods

LLM-Datasets is built around several key principles:

  • HPC-ready: Designed for high-performance computing environments, with data stored in manageable chunks to balance memory constraints and reduce inode counts.
  • Modular and Extensible: Comes with a large collection of preconfigured datasets (2241 at the time of writing) and allows users to easily add their own custom datasets or data formats.
  • Private Data Support: Accommodates datasets with license restrictions or other privacy concerns, allowing them to be tagged and managed separately.
  • Reproducible Dataset Composition: Ensures that dataset creation is reproducible by relying on configuration files that specify dataset selection, sampling, and random seeds.
  • Model Agnostic: The framework produces tokenized data that can be consumed by various LLM architectures and frameworks, such as Hugging Face Transformers and NVIDIA's Megatron-LM.

The core of the framework is a processing pipeline consisting of three main steps:

  1. Text Extraction: Extracting plain text from raw data files, with reusable abstractions for common formats.
  2. Data Composition: Mixing and sampling selected datasets based on configuration files, with optional deduplication.
  3. Tokenization: Converting the composed text data into a format suitable for LLM training.

Additionally, a web-based dataset viewer is provided for inspecting dataset content and statistics, aiding in quality control and debugging.

Datasets

The paper introduces the LLM-Datasets framework itself, which acts as a repository and processing tool for a vast number of datasets. At the time of publication, it includes:

  • 2241 preconfigured datasets.
  • Data from 62 sources for the European pretraining dataset.
  • Coverage of 32 European languages in the example European pretraining dataset.

The paper highlights several data sources used in their example European dataset, including:

  • Colossal OSCAR: A large-scale, annotated version of Common Crawl snapshots.
  • CURLICAT Corpus: A collection of multilingual corpora.
  • MaCoCu: A corpus focused on under-resourced languages.
  • RedPajama-Data T1: A recipe to reproduce the LLaMA training dataset.
  • peS2o: A dataset of scientific papers.
  • Open Legal Data: A platform for legal documents.
  • DeWaC: A German web corpus.
  • Gaois bilingual corpus: An English-Irish legislation corpus.
  • StarCoder: A dataset of code in multiple programming languages.
  • Pile of Law: A corpus of legal and administrative data.

The paper also lists numerous other datasets and data sources in its extensive reference section.

Key Insights and Ideas

  • The Pretraining Data Gap: The most significant insight is the critical need for standardized, accessible, and reproducible pretraining datasets. This has been a bottleneck in LLM research, hindering progress and reproducibility.
  • Community-Driven Approach: LLM-Datasets emphasizes a community effort, encouraging collaboration to collect and curate high-quality datasets, especially for under-resourced languages.
  • Unified Interface for Complexity: The framework simplifies the complex process of data acquisition and preparation by providing a single, consistent interface for diverse data sources and formats.
  • Reproducibility is Paramount: The design prioritizes reproducibility through configuration files, allowing researchers to recreate specific dataset compositions even as underlying data sources evolve.
  • Language-Specific Data Quality: The authors highlight the intuition that curated language-specific data might offer higher quality than purely web-crawled data, though they acknowledge challenges in finding such sources for low-resource languages.

Key Results

The paper showcases the LLM-Datasets framework by presenting a European pretraining dataset comprising 2.3 trillion tokens and covering 32 European languages. This dataset was compiled using the LLM-Datasets framework and is fully reproducible. The authors also provide detailed tables and figures illustrating the language distribution and token counts within this dataset, showing English as the dominant language.

Limitations and Future Work

  • Filtering Complexity: While the framework provides a unified interface, the specific filtering strategies (e.g., quality warnings, perplexity filters, blocklists) are left to the user, requiring manual inspection and decision-making, as demonstrated in their OSCAR filtering process.
  • Focus on Pretraining: The framework is primarily designed for pretraining datasets. While it can be extended, specific tools for fine-tuning dataset management might be separate.
  • Future Work: The authors suggest that the framework's modularity and extensibility will allow for the integration of new datasets and processing techniques. The community-driven nature implies ongoing expansion of the dataset collection. The paper also mentions that parts of their European dataset are already being used to train language models, indicating ongoing practical application and potential for further research based on this data.

Summary updated

BibTeX
@inproceedings{ostendorff2024llm,
  author = {Malte Ostendorff and Pedro Ortiz Suarez and Lucas Fonseca Lage and Georg Rehm},
  title = {{LLM-Datasets: An Open Framework for Pretraining Datasets of Large Language Models}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=5RdIMlGLXL},
}
Figure