Open-source data curation toolkit for ML. Filter, deduplicate, score, and explore your training data.
Project description
pytest for your training data.
Quick Start • Install • Docs • Contribute
One command to grade your ML training data. Filter junk, deduplicate, score quality, find outliers, and search — from a single pip install.
Installation
pip install dokime
For the full toolkit (embeddings, fuzzy dedup, language detection):
pip install "dokime[all]"
Pick individual extras
| Extra | What it adds |
|---|---|
dokime[embeddings] |
Sentence-transformer embeddings, FAISS search, semantic dedup |
dokime[dedup] |
MinHash-LSH fuzzy deduplication |
dokime[nlp] |
Language detection (lingua) |
dokime[io] |
HuggingFace datasets, Pandas |
dokime[explore] |
Interactive web UI |
Quick Start
Score your data in one command:
dokime score data.jsonl
Build a curation pipeline:
from dokime.core.pipeline import Pipeline
from dokime.core.filters import LengthFilter, WhitespaceFilter, RepetitionFilter
from dokime.quality.dedup import ExactDedup
pipeline = Pipeline("my-curation")
pipeline.add_filter(LengthFilter(min_length=50, max_length=100_000))
pipeline.add_filter(WhitespaceFilter(max_whitespace_ratio=0.4))
pipeline.add_filter(RepetitionFilter(max_repetition_ratio=0.3))
pipeline.add_filter(ExactDedup())
result = pipeline.run("data/raw.jsonl", "data/curated.parquet")
print(f"Kept {result['total_kept']:,} / {result['total_read']:,} documents")
Or from the CLI:
dokime curate data/raw.jsonl data/clean.parquet \
--min-length 50 --max-whitespace 0.4 --dedup
What's in the box
Quality scoring — Grade your dataset A-F with per-document signals: entropy, character ratios, word count, repetition detection.
12 heuristic filters — Length, word count, whitespace, repetition, special characters, alphabetic ratio, URLs, stopwords, language, field existence, regex. All composable via code or YAML.
3 dedup strategies — Exact (SHA-256), fuzzy (MinHash-LSH), and semantic (embedding cosine similarity).
Embeddings & search — Compute sentence-transformer embeddings, FAISS-backed search, k-NN anomaly/outlier detection.
Pipeline orchestration — Chain filters, configure via YAML, streaming execution with constant memory, per-filter removal stats.
10 CLI commands — version, curate, stats, embed, search, outliers, score, push, attribute, explore.
Documentation
Full docs at dokime-ai.github.io/dokime.
Contributing
We welcome contributions. See CONTRIBUTING.md for setup instructions.
License
Apache 2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dokime-0.2.0.tar.gz.
File metadata
- Download URL: dokime-0.2.0.tar.gz
- Upload date:
- Size: 181.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e1406fb4f56a977178e7f66569be9fae4b1aa0924718dc91baeba0adcf8a539
|
|
| MD5 |
7f708dc9a757daded74230b64ac9a26b
|
|
| BLAKE2b-256 |
d704e2084419bca9ed92c173a5d894840cdb63ea131e5d7933658383b41fcdf3
|
Provenance
The following attestation bundles were made for dokime-0.2.0.tar.gz:
Publisher:
publish.yml on dokime-ai/dokime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dokime-0.2.0.tar.gz -
Subject digest:
5e1406fb4f56a977178e7f66569be9fae4b1aa0924718dc91baeba0adcf8a539 - Sigstore transparency entry: 1135618564
- Sigstore integration time:
-
Permalink:
dokime-ai/dokime@02aa3106c904ea0a47facc2eb58b89b3a448a0e7 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dokime-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02aa3106c904ea0a47facc2eb58b89b3a448a0e7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dokime-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dokime-0.2.0-py3-none-any.whl
- Upload date:
- Size: 56.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c804fe91ace65c709eea3aed320e98917866ff93e01e50121090442ef2382b5a
|
|
| MD5 |
1cfa069a95426a8478f97ef3f11f87a5
|
|
| BLAKE2b-256 |
3980e89dd1a02afe73685000b632b4010b6f140602338f6a3a12d8aee5df2301
|
Provenance
The following attestation bundles were made for dokime-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dokime-ai/dokime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dokime-0.2.0-py3-none-any.whl -
Subject digest:
c804fe91ace65c709eea3aed320e98917866ff93e01e50121090442ef2382b5a - Sigstore transparency entry: 1135618643
- Sigstore integration time:
-
Permalink:
dokime-ai/dokime@02aa3106c904ea0a47facc2eb58b89b3a448a0e7 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dokime-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02aa3106c904ea0a47facc2eb58b89b3a448a0e7 -
Trigger Event:
release
-
Statement type: