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
readers.WarcReader ~2.2x gzip WARCs; charset detection stays in Python
filters.URLFilter ~7x mostly blocklist loading and tldextract setup
filters.LanguageFilter ~1.3x the rest is fastText's own C++ inference

Filter and MinHash speedups are single-thread throughput on 1,000 FineWeb documents. Trafilatura's is inside the full pipeline; reader, URL and language numbers are CPU time on 5,000 Common Crawl records. 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.2

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.2
File Size Uploaded Provenance Actions
datatrove_rs-0.1.2.tar.gz 181.5 kB With provenance Details for datatrove_rs-0.1.2.tar.gz

Built distributions (wheels)

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

Total release size: 6.9 MB

Release files / datatrove_rs-0.1.2.tar.gz

Download URL datatrove_rs-0.1.2.tar.gz
Size 181.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ba7a976f774eb274919d5e473fe19a27e61a07e2eefaee87829c42b483abb58f
BLAKE2b-256 checksum
How to use checksums
b61836330ba7d9605495d8eb211ed93fc410afc5050558ab9cc58a157c863d99
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.2-cp310-abi3-win_amd64.whl

Download URL datatrove_rs-0.1.2-cp310-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a9d6280f5ffd66c3186b922c3b7f86c0ba803c8a9d25cbaa4fc5c10a97b3b8df
BLAKE2b-256 checksum
How to use checksums
a10190da7dd9a6bca2526e3b7320fed063b1d0b7836ce2aa8b29f34f1aaa203b
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.2-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL datatrove_rs-0.1.2-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
b7393ac5fa02e1dab9c7f87b7f0de000bd57429d8b260db2108828cb25dc7a9f
BLAKE2b-256 checksum
How to use checksums
f66415a8195db8f23e5b09660335d09c94455f27dba89698daf1b388bb7e1868
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.2-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL datatrove_rs-0.1.2-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
20b15c420fe28dffd9cb50b9c631ae29513db9ee014264272189f8c64b3b3db3
BLAKE2b-256 checksum
How to use checksums
51591cdac76defc108b432fe2578bed5488652b2a0be598c28169a03f6b12084
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.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL datatrove_rs-0.1.2-cp310-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fcdae6946e9c23f3acce36c1aac46daf5f0db2af5baaa1a0c10f95a4024a9e46
BLAKE2b-256 checksum
How to use checksums
102988642dc3966a9768c0436853f3263e681de8c992918b8919920669d82aba
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.2-cp310-abi3-macosx_10_12_x86_64.whl

Download URL datatrove_rs-0.1.2-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d1f30b6bac3e9c62b4441ae1a7adfa4f1f60a610b48ebff1cbff69574a3dbac5
BLAKE2b-256 checksum
How to use checksums
77b142c7876fe46edd8ad8d717fcca822cb4d5cc00162dc1bd0bbac47aa7c31c
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.2

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.2.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