DataTrove: Streamlining Large-Scale Data Processing for LLMs

This repository profile is provided by osrepos.com, an open source repository discovery platform.

DataTrove: Streamlining Large-Scale Data Processing for LLMs

Summary

DataTrove is a powerful Python library designed to simplify the complex task of processing, filtering, and deduplicating text data at a massive scale. It offers a collection of customizable, platform-agnostic pipeline blocks, making it ideal for preparing training data for large language models. With support for various execution environments, DataTrove frees developers from scripting madness, enabling efficient and reproducible data workflows.

Repository Information

Analyzed by OSRepos on January 27, 2026

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

DataTrove is a powerful Python library from Hugging Face designed to streamline the complex process of handling vast amounts of text data. It aims to free data processing from "scripting madness" by offering a robust set of platform-agnostic, customizable pipeline processing blocks. Whether you're preparing training data for large language models (LLMs) or performing extensive data cleaning, DataTrove provides the tools to build efficient and scalable data workflows. It supports various file systems through fsspec, ensuring flexibility in data input and output.

Installation

Getting started with DataTrove is straightforward. You can install it using pip, with optional "flavours" to include specific dependencies for different functionalities:

pip install datatrove[FLAVOUR]

Available flavours include all, io (for various file formats), processing (for text extraction, filtering, tokenization), s3 (for S3 support), cli (for command-line tools), and ray (for distributed compute). You can combine them, for example: pip install datatrove[processing,s3].

Examples

DataTrove comes with several practical examples demonstrating its capabilities for common large-scale data tasks:

  • FineWeb Dataset Reproduction: A complete script to reproduce the FineWeb dataset. See fineweb.py.
  • Common Crawl Processing: A full pipeline to read Common Crawl WARC files, extract text, filter, and save to S3, runnable on Slurm. See process_common_crawl_dump.py.
  • C4 Dataset Tokenization: Reads data directly from Hugging Face Hub to tokenize the English portion of the C4 dataset using the gpt2 tokenizer. See tokenize_c4.py.
  • Text Deduplication: Examples for various deduplication techniques, including MinHash, sentence-level exact deduplication, and exact substrings. See minhash_deduplication.py and sentence_deduplication.py.

Why Use DataTrove?

DataTrove offers compelling advantages for anyone dealing with large text datasets:

  • Scalability and Performance: Designed for very large workloads, it features low memory usage and supports distributed execution across local machines, Slurm clusters, and Ray clusters. Its task-based execution model allows for efficient parallelization.
  • Flexible and Modular Pipelines: Build custom data processing pipelines using a wide array of prebuilt blocks for reading, writing, extracting, filtering, deduplicating, and collecting statistics. You can easily extend it with your own custom functions or blocks.
  • Robustness and Reproducibility: DataTrove tracks completed tasks, enabling automatic resumption of jobs from the last successful checkpoint. This ensures resilience against failures and promotes reproducible data processing workflows.
  • Advanced Synthetic Data Generation: The library includes powerful inference capabilities, supporting vLLM, SGLang, and OpenAI-compatible endpoints for generating synthetic data at scale, complete with checkpointing and progress monitoring.
  • Comprehensive Data Insights: Utilize integrated statistics blocks to collect detailed data profiles, offering valuable insights into your dataset's characteristics in a distributed manner.

Links

  • GitHub Repository: Explore the source code, contribute, and stay updated on the project's development: huggingface/datatrove
  • Citation: If you use DataTrove in your research or projects, please consider citing it:
    @misc{penedo2024datatrove,
      author = {Penedo, Guilherme and Kydlí?ek, Hynek and Cappelli, Alessandro and Sasko, Mario and Wolf, Thomas},
      title = {DataTrove: large scale data processing},
      year = {2024},
      publisher = {GitHub},
      journal = {GitHub repository},
      url = {https://github.com/huggingface/datatrove}
    }
    

Related repositories

Similar repositories that may be relevant next.

karpathy-llm-wiki: Build a Karpathy-Style LLM Knowledge Base

karpathy-llm-wiki: Build a Karpathy-Style LLM Knowledge Base

September 9, 2026

karpathy-llm-wiki is an Agent Skills-compatible tool that implements Karpathy's LLM Wiki idea, allowing users to build a durable knowledge base. It enables LLMs to maintain structured wiki pages by ingesting sources, compiling knowledge, and answering questions with citations. This project offers a robust alternative to traditional RAG for compounding knowledge over time.

llm-wikiknowledge-baseagent-skill
CQ: An Open Standard for Shared Agent Learning by Mozilla.ai

CQ: An Open Standard for Shared Agent Learning by Mozilla.ai

September 5, 2026

CQ is an open standard designed to prevent AI agents from repeatedly making the same mistakes by enabling them to persist, share, and query collective knowledge. It facilitates a structured exchange of ideas, allowing agents to learn from each other's experiences and accelerate development. This system helps agents avoid redundant debugging and discover solutions more efficiently.

agentsgopython
Otari: Self-Hosted OpenAI-Compatible LLM Gateway for 40+ Providers

Otari: Self-Hosted OpenAI-Compatible LLM Gateway for 40+ Providers

September 4, 2026

Otari, from Mozilla AI, is an open-source, self-hosted LLM gateway. It provides a single OpenAI-compatible endpoint to connect with over 40 model providers, offering features like virtual keys, budget enforcement, and usage tracking. This solution empowers users to manage their AI stack with greater control and flexibility.

ai-gatewayllmopenai-compatible
Agent Factory: Generate AI Agents with Natural Language Descriptions

Agent Factory: Generate AI Agents with Natural Language Descriptions

September 3, 2026

Agent Factory, developed by Mozilla-AI, is a powerful tool designed to generate AI agents and workflows. It allows users to describe tasks in natural language, which it then transforms into executable Python code for agentic workflows. Leveraging the Model Context Protocol (MCP) and the any-agent library, it simplifies the creation of complex AI solutions.

agentagentic-aicli

Source repository

Open the original repository on GitHub.

14 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️