Skip to main content

datatrove-rs

PyPI Python versions CI License

Rust implementations of the hot steps in datatrove pipelines, with byte-identical output. Turn it on with one environment variable, keep your pipeline code as it is, and the FineWeb recipe runs about 5x faster.

FineWeb recipe on 5,000 Common Crawl pages: datatrove 87.7 s, datatrove-rs 17.3 s

Installation

pip install "datatrove-rs[trafilatura]"

The [trafilatura] extra adds trafilatura-rs for HTML extraction, which is where most of the recipe's time goes. Leave the extra off to accelerate only the filters and MinHash.

Requires Python 3.10+ and datatrove >=0.10.1,<0.11. Wheels are built for Linux, macOS and Windows.

Quickstart

Your existing pipeline, unchanged:

DATATROVE_RS=1 python my_pipeline.py

That's it. Any step datatrove-rs covers runs in Rust; every other step runs datatrove's own code. The switch also reaches executor worker processes.

Prefer it in code? Either of these works too:

import datatrove_rs
datatrove_rs.patch()  # datatrove's own imports now return the Rust-backed steps

# or import from the mirror: any `datatrove.X` module is available as `datatrove_rs.X`
from datatrove_rs.pipeline.filters import GopherQualityFilter, URLFilter

You can also run a script unmodified with python -m datatrove_rs my_pipeline.py.

What's accelerated

datatrove step Speedup Notes
extractors.Trafilatura ~7x via trafilatura-rs, with the [trafilatura] extra
filters.GopherRepetitionFilter 87x
filters.GopherQualityFilter 79x
filters.C4QualityFilter 49x
filters.FineWebQualityFilter 86x
dedup.MinhashDedupSignature 48x MinHash stage 1

Filter and MinHash speedups are single-thread throughput on 1,000 FineWeb documents. Trafilatura's is inside the full pipeline. Full numbers and method: docs/fineweb-profile.md.

Each replacement subclasses the datatrove step, takes the same arguments and produces the same results: keep/drop decisions, drop reasons, rewritten text, stats and MinHash signature files. Pickled pipelines work on Slurm and local multiprocessing workers whether or not the worker patched.

Exactness

Output equality with datatrove is the product, so every change is checked against unmodified datatrove:

  • Filters and MinHash: 10,500 real, perturbed and fuzzed documents across 26 configurations, 0 mismatches. The spaCy-compatible tokenizer matches spaCy on 9.7M tokens.
  • Trafilatura: 10,666 of 10,666 Common Crawl pages identical (see trafilatura-rs).
  • End to end: the FineWeb recipe gives identical output on 5,000 Common Crawl records.

When the Rust path can't guarantee identical results, the step falls back to datatrove's own code for that case. This applies to non-English languages and to Trafilatura options trafilatura-rs doesn't cover. Details and reproduced quirks are in docs/parity.md.

Contributing

Development setup, the parity harness, benchmarks and releasing: CONTRIBUTING.md.

License

Apache-2.0, like datatrove. datatrove-rs is an independent project and is not affiliated with Hugging Face.

Metadata

Release files for datatrove-rs 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datatrove-rs 0.1.1
File Size Uploaded Provenance Actions
datatrove_rs-0.1.1.tar.gz 167.1 kB With provenance Details for datatrove_rs-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for datatrove-rs 0.1.1
File Actions
datatrove_rs-0.1.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for datatrove_rs-0.1.1-cp310-abi3-win_amd64.whl
datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl
datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl
datatrove_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for datatrove_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
datatrove_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for datatrove_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 6.4 MB

Release files / datatrove_rs-0.1.1.tar.gz

Download URL datatrove_rs-0.1.1.tar.gz
Size 167.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b2a9068e1ceb86fffdd49e47637e4a81f681a79cd5821e0ec594034ebf445fd2
BLAKE2b-256 checksum
How to use checksums
4d201b263366e62139478987548d909b256b5b08d43907da2764b34bd88fa2b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / datatrove_rs-0.1.1-cp310-abi3-win_amd64.whl

Download URL datatrove_rs-0.1.1-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6c2167842ac8f2956bff798619a2c44445aafc50e95ac3d5fd212e6480999726
BLAKE2b-256 checksum
How to use checksums
c6aa89d4b9f924edc514cfc956088f09688b2b8f2b51a6c10887704390ebfaaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
aa178de1fb8967d8460ccab324fce213a09de55d9cde02211dfcfb4733264d4c
BLAKE2b-256 checksum
How to use checksums
31b5a75cae15cf15f03be9b46d70fd59ae372bc849f9bad14a2d596b1ebfef0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL datatrove_rs-0.1.1-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
9d5031324d44f4e96c5641dedb17fb3f29f961086668f0600ba5b317e750f861
BLAKE2b-256 checksum
How to use checksums
8e03cff37acf7211b25b1520a2381f1dfff7f2f5e1a8841967864c58c67c909d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / datatrove_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL datatrove_rs-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
27e57693e7b59e043e12db1f9f07e4e6c3e0ffbbc0d29a377f15b4d8d7a61a71
BLAKE2b-256 checksum
How to use checksums
d33062e088f4cf6755fbab4bcd896de0d266d0b023bacec625116504fd24d53b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / datatrove_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL datatrove_rs-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
cfef1e5da97734d8ebb4a7ae0000bd11d3062f253b3cbdd2e429134438297015
BLAKE2b-256 checksum
How to use checksums
5ca9123f78a3a08119100024942162cc111142f648bc145bcd86e9df1e485b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for datatrove-rs 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for datatrove_rs-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page