What do you want to do?
3 use cases
-
Sample a text dataset with a DataTrove pipeline
Read a CSV, randomly drop half the documents and write JSONL.
View prompt
Using huggingface/datatrove, run `uv sync`, then build a pipeline with `CSVReader`, `SamplerFilter(rate=0.5)` and `JsonlWriter` for my data folder and run it.
-
Run a pipeline in parallel on one machine
Use LocalPipelineExecutor with several workers and resume failed tasks.
View prompt
With huggingface/datatrove, wrap my pipeline in `LocalPipelineExecutor` using `tasks=10` and `workers=5`, then call `executor.run()` and report failures.
-
Install the extras for a full corpus pipeline
Pick the dependency flavours you need and start from the minhash deduplication example.
View prompt
In huggingface/datatrove run `uv sync --extra all`, read examples/minhash_deduplication.py and adapt it to deduplicate my text data.
Quick start with Datatrove
- Check you have what it needs: Python 3.11 or newer; uv for installing; Input text data such as CSV, JSONL or parquet.
- Open huggingface/datatrove on GitHub and read the README and license.
- Install with
uv sync - Import
from datatrove.pipeline.readers import CSVReader - Add
SamplerFilter(rate=0.5)between the reader andJsonlWriter - Point
data_folderandoutput_folderat your own paths
These steps come from our top use case, Sample a text dataset with a DataTrove pipeline, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for huggingface/datatrove
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forML engineers who prepare text corpora for LLM training.
- Why it is hot3.4k stars, talked about in 2 AI sources we track
- LanguagePython
- Sourcegithub.com/huggingface/datatrove ยท Back to Hot repos
Requirements
- Python 3.11 or newer
- uv for installing
- Input text data such as CSV, JSONL or parquet
Add this badge to your README
Maintain Datatrove? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/huggingface-datatrove/?utm_source=github&utm_medium=badge&utm_campaign=huggingface-datatrove)
HTML
<a href="https://dedupedai.com/use-cases/huggingface-datatrove/?utm_source=github&utm_medium=badge&utm_campaign=huggingface-datatrove"><img src="https://dedupedai.com/badge/huggingface/datatrove.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Datatrove
What is Datatrove?
DataTrove is a library to process, filter and deduplicate text data at a very large scale. It provides prebuilt blocks for reading, extracting, filtering, deduplicating and tokenizing, and the same pipeline runs locally or on a slurm cluster. It is an open-source project on GitHub: https://github.com/huggingface/datatrove.
How do I use Datatrove?
Install with uv sync; then import from datatrove.pipeline.readers import CSVReader; add SamplerFilter(rate=0.5) between the reader and JsonlWriter. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Datatrove for?
ML engineers who prepare text corpora for LLM training.
What can I do with Datatrove?
3 use cases so far, for example: Sample a text dataset with a DataTrove pipeline; Run a pipeline in parallel on one machine; Install the extras for a full corpus pipeline. Each has steps and a copy-paste agent prompt.
What do I need to run Datatrove?
Python 3.11 or newer; uv for installing; Input text data such as CSV, JSONL or parquet.
What are alternatives to Datatrove?
Other hot AI repos in Data and analytics: Auto Ontology, Marker, Chronos Forecasting, Apify MCP Server, Crawlee Python.
Is Datatrove safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.