需要 Python 3.10~3.13,版本不符会装不上;[all] 会安装全部 transform,依赖较重,可按需只装子集;部分 transform 需要额外下载模型或数据,README 提示可从 HuggingFace 取真实数据测试。
data-prep-kit
data-prep-kitApache-2.0活跃维护面向 GenAI 应用的开源数据准备工具包,提供去重、数据清洗与预处理流水线,帮助把原始数据整理成可用于微调大模型的高质量数据集。
Open source project for data preparation for GenAI applications
pip install uv
uv pip install 'data-prep-toolkit-transforms[all]'README 未说明具体显存或 GPU 型号要求,只说明可从普通笔记本扩展到数据中心规模;Ray 运行时用于横向扩展。
面向 GenAI 的开源数据准备工具,把非结构化数据清洗、转换、增强成可训练或可 RAG 的数据
面向 GenAI 应用的开源数据准备工具包,提供去重、数据清洗与预处理流水线,帮助把原始数据整理成可用于微调大模型的高质量数据集。
核心能力
- 提供去重、过滤、分词、PII 脱敏等数十种可组合 transform
- 同时支持 Python 与 Ray 两种运行时,可从笔记本扩展到数据中心
- 覆盖自然语言、代码、图像三种数据模态
- 内置 Parquet、ZIP、NDJSON、JSONL 格式处理框架,可写自定义 transform
- 支持在 Kubernetes 上以 Python 或 Ray 作业部署,并用 Tekton 串联多步流水线
容易踩的坑
- v1.1.8Release 1.1.8最新正式版2026-06-22 · 2026-06-22 16:30 UTC
What's Changed
- added new malware transform with YARA rules by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1587
- Py 14 by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1588
- updated ray version for all python versions and removed pyarrow versi… by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1589
- Malware/filter metadata updates by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1590
- Added a Claude skill for release management and modified README for l… by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1586
Full Changelog: https://github.com/data-prep-kit/data-prep-kit/compare/v1.1.7...v1.1.8
- v1.1.72026-02-11 · 2026-02-11 15:51 UTC
查看更新说明
What's Changed
- preparing for a new release by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1527
- replacing existing text_encoder with lanceDB integration by @klwuibm in https://github.com/data-prep-kit/data-prep-kit/pull/1512
- Doc id fix by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1534
- update deployed module names, fixes OpenSearch input parameters by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1528
- updated docling2parquet to remove image data from contents field when… by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1531
- Enhancement to README file by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1526
- changing embeddings_in_parquet flag to embeddings_in_lanceDB to fix b… by @klwuibm in https://github.com/data-prep-kit/data-prep-kit/pull/1542
- Add Spark support for doc_quality and docling2parquet. by @Mohammad-nassar10 in https://github.com/data-prep-kit/data-prep-kit/pull/1544
- added pytests for batch generation by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1543
- add a Rich-based Log handler by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1519
- tkn2arrow-restructured folder and test ray job by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1539
- Ededup fix by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1536
- modified requirements.txt data_processing to remove burden for model_… by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1546
- Collapse: Added rayjob yaml file by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1548
- resize: Added rayjob yaml by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1549
- remove fullpath printing for log levels greater that Debug by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1552
- Pii image notebook by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1553
- Small fixes in the logger formatter by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1555
- remove a duplicated line by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1556
- Folder-to-Parquet Transform by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1507
- Show some selected output cells by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1560
- Fix a bug in transform.py when GPU is available by @klwuibm in https://github.com/data-prep-kit/data-prep-kit/pull/1564
- add an option to set dpw log handlers by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1568
- Move SinkHandler to data_processing lib. by @revit13 in https://github.com/data-prep-kit/data-prep-kit/pull/1567
- update boto3 version in data-proccessing-lib requirements by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1570
- added changes for installing with python 13 by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1554
- fix type mispatmch str/int in ededup when using int_doc_id by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1559
- LF TSC changes by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1573
- Image Transforms : Added model loader for downloading yolov in runtime by @Raghav-Bell in https://github.com/data-prep-kit/data-prep-kit/pull/1572
- updated files to utilize uv by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1574
- fixing web2parquet notebook by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1577
- adding dev6 release for regression testing by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1579
- preparing for a new release (1.1.7) by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1580
Full Changelog: https://github.com/data-prep-kit/data-prep-kit/compare/v1.1.6...v1.1.
- v1.1.6v.1.1.62025-11-14 · 2025-11-14 16:11 UTC
查看更新说明
What's Changed
- Tekton pipelines Feature branch for experimentation by @matouma in https://github.com/data-prep-kit/data-prep-kit/pull/1454
- Tekton 2 by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1461
- added role for pipeline service account on ocp by @matouma in https://github.com/data-prep-kit/data-prep-kit/pull/1463
- Fix Access denied for docling image by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1465
- Build and use new image with kubectl and oc commands by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1473
- preparing for a new release by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1476
- Restructured folder separating tasks from pipelines by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1479
- Reference feature/tekton in repo task by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1482
- updated rag_pdf_example with version 1.1.4 and docling2parquet by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1478
- Documentation : fixed the parameter
int_id_columnname by @Raghav-Bell in https://github.com/data-prep-kit/data-prep-kit/pull/1475 - Truncated exception message by @Raghav-Bell in https://github.com/data-prep-kit/data-prep-kit/pull/1480
- Update doc_id-ray.ipynb with correct int column name by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1490
- updated blocklist to accept blocked_domain_list locally without daf by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1497
- hacktoberfest - Fix dpk_docling2parquet and other other imports in notebooks that were broken in many places - issue 1481 by @maaleemkazmi-code in https://github.com/data-prep-kit/data-prep-kit/pull/1488
- Added crypto example to the PII recipe by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1486
- DocID: Create and test new Python Dockerfile and Python job by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1498
- DocId: Tested to show depricated warning by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1501
- added easyocr to requirements sincen no longer included in latest ver… by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1502
- Enable Tekton pipeline to use python runtime by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1492
- Examples notebook for newly added transform blocklist #1315 by @mahadevroy84 in https://github.com/data-prep-kit/data-prep-kit/pull/1496
- Combine all dpk logs into a single one by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1499
- Added notes for hugging face gated models. by @Raghav-Bell in https://github.com/data-prep-kit/data-prep-kit/pull/1504
- Docling2parquet options for extractings binaries for images/pages by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1505
- Tekton pipelines running on K8s by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1460
- Allow runtime to process zip, ndjson and json in addition to parquet by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1506
- Fix Doc id to be able to process lists content -Rebased by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1520
- Mention support for new formats in README by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1515
- Opensearch transform by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1449
- Multimodal refactor by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1516
- Release 3 Multi-modal transforms by @matouma in https://github.com/data-prep-kit/data-prep-kit/pull/1278
- removed all kfp workflows by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1522
- adding dev1 release for regression testing by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1521
- preparing fo
- v1.1.52025-10-02 · 2025-10-02 15:20 UTC
查看更新说明
What's Changed
- Change in the governance personnel by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1444
- PII Redactor: restructure to use new runtime file names and tested for cryto by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1459
- Gneissweb: use new convention for runtime file names by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1458
- added options for vlm granite docling in docling2parquet by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1456
- Fixed typo in CONTRIBUTING.md file by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1452
- Documentation - PDF File link correction by @Raghav-Bell in https://github.com/data-prep-kit/data-prep-kit/pull/1464
- Added python multiprocessing job and fix multiprocesing boto pickle e… by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1457
- Changes to recipe notebooks due to release 1.1.5.dev0 by @shahrokhDaijavad in https://github.com/data-prep-kit/data-prep-kit/pull/1467
- Gw multiprocessing and rayjob by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1445
- restrict version of matplotlib in requirements.txt for flair in pii_r… by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1468
- check filter_criteria for None by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1470
New Contributors
- @Raghav-Bell made their first contribution in https://github.com/data-prep-kit/data-prep-kit/pull/1464
Full Changelog: https://github.com/data-prep-kit/data-prep-kit/compare/v1.1.4...v1.1.5
- v1.1.42025-09-16 · 2025-09-16 01:39 UTC
查看更新说明
What's Changed
- preparing for a new release by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1425
- [bug] Extend tokenization to process list of strings by @matouma in https://github.com/data-prep-kit/data-prep-kit/pull/1433
- Updating code to put -1 when text content is empty by @santoshborse in https://github.com/data-prep-kit/data-prep-kit/pull/1424
- fix additional secrets by @roytman in https://github.com/data-prep-kit/data-prep-kit/pull/1431
- updated filter transform to return empty table with original schema r… by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1434
- Avoid latest release of polars 1.33 that is breaking the code by @touma-I in https://github.com/data-prep-kit/data-prep-kit/pull/1439
- added support for binary transforms and data in chain, updated tests, readme, … by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1429
- Drop lower bound on boto3 dependency. by @revit13 in https://github.com/data-prep-kit/data-prep-kit/pull/1437
- updated logging to remove access and secret key from config if there by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1440
- adding dev1 release for regression testing by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1441
- preparing for a new release (1.1.4) by @swith005 in https://github.com/data-prep-kit/data-prep-kit/pull/1442
Full Changelog: https://github.com/data-prep-kit/data-prep-kit/compare/v1.1.3...v1.1.4
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Data-Prep-Kit accelerates unstructured data preparation for LLM app developers. Developers can use Data-Prep-Kit to cleanse, transform, and enrich use case-specific unstructured data to pre-train LLMs, fine-tune LLMs, instruct-tune LLMs, or build Retrieval Augmented Generation (RAG) applications for LLMs
Data-Prep-Kit can readily scale from a commodity laptop all the way to data center scale.
Features
- The kit provides a growing set of modules/transforms targeting laptop-scale to datacenter-scale processing.
- The data modalities supported today are: Natural Language, Code, and Image.
- The modules are built on common frameworks for Python and Ray runtimes for scaling up data processing.
- The kit provides a framework for developing custom transforms for processing Parquet files as well as ZIP, NDJSON, and JSONL file formats.
- The kit provides examples of how a single transform can be deployed on Kubernetes clusters as a Python or a Ray job. Additionally, when multiple transforms are deployed in a sequence, the kit uses Tekton pipelines.
Installation
The latest version of the Data-Prep-Kit is available on PyPi for Python 3.10, 3.11, 3.12, and 3.13. It can be installed using:
pip install uv
uv pip install 'data-prep-toolkit-transforms[all]'
This will install all available transforms.
For guidance on creating the virtual environment for installing the data prep kit, click here.
🚀 Getting Started
Fastest way to experience Data-Prep-Kit
With no setup necessary, let's use a Google Colab friendly notebook to try Data-Prep-Kit. This is a simple transform to extract content from PDF files: examples/notebooks/Run_your_first_transform_colab.ipynb | . (Here are some tips for running Data-Prep-Kit transforms on Google Colab. For this simple example, these tips are either already taken care of, or are not needed.) The same notebook can be downloaded and run on the local machine, without cloning the repo or any other setup.
Examples
Now that you have run a single transform, the next step is to explore how to put these transforms together to run a data prep pipeline for end to end real enterprise use cases like fine-tuning a model or building a RAG application.
We have a complete set of data processing recipes for such use cases.
We also have a developer tutorial for contributing a new transform to the kit.
For advanced users, here is more information for adding your own transform, running transforms from the command line, scaling and automation and more. Also, repository structure and use are discussed here.
Using HuggingFace data files
All the transforms in the kit include small sample data files for testing, but advanced users who want to download real data files from HuggingFace and use them in testing, can refer to this.
Supported data transforms
The matrix below shows the the combination of modules and supported runtimes. All the modules can be accessed here and can be combined to form data processing pipelines, as shown in the examples folder.
| Modules | Python-only | Ray |
|---|---|---|
| Data Ingestion | ||
| Code (from zip) to Parquet | :white_check_mark: | :white_check_mark: |
| Docling to Parquet | :white_check_mark: | :white_check_mark: |
| HTML to Parquet | :white_check_mark: | :white_check_mark: |
| Web to Parquet | :white_check_mark: | |
| Universal (Code & Language) | ||
| Exact dedup filter | :white_check_mark: | :white_check_mark: |
| Fuzzy dedup filter | :white_check_mark: | :white_check_mark: |
| Unique ID annotation | :white_check_mark: | :white_check_mark: |
| Filter on annotations | :white_check_mark: | :white_check_mark: |
| Profiler | :white_check_mark: | :white_check_mark: |
| Resize | :white_check_mark: | :white_check_mark: |
| Hate, Abuse, Profanity (HAP) | :white_check_mark: | :white_check_mark: |
| Tokenizer | :white_check_mark: | :white_check_mark: |
| Tokenization2Arrow | :white_check_mark: | :white_check_mark: |
| Repetition removal | :white_check_mark: | :white_check_mark: |
| Bloom filter | :white_check_mark: | |
| Collapse(column concatenation) | :white_check_mark: | :white_check_mark: |
| Blocklist | :white_check_mark: | :white_check_mark: |
| C4 annotator | :white_check_mark: | :white_check_mark: |
| Fineweb quality annotator | :white_check_mark: | :white_check_mark: |
| Gopher repetition annotator | :white_check_mark: | :white_check_mark: |
| Opensearch | :white_check_mark: | :white_check_mark: |
| Folder2Parquet | :white_check_mark: | |
| Language-only | ||
| Language identification | :white_check_mark: | :white_check_mark: |
| Document quality | :white_check_mark: | :white_check_mark: |
| Document chunking for RAG | :white_check_mark: | :white_check_mark: |
| Text encoder | :white_check_mark: | :white_check_mark: |
| PII Annotator/Redactor | :white_check_mark: | :white_check_mark: |
| Similarity | :white_check_mark: | |
| GneissWeb classification | :white_check_mark: | :white_check_mark: |
| Readability scores | :white_check_mark: | :white_check_mark: |
| Extreme tokenized annotation | :white_check_mark: | :white_check_mark: |
| ML Filter | :white_check_mark: | :white_check_mark: |
| ML Enrichment(quality annotation) | :white_check_mark: | :white_check_mark: |
| Code-only | ||
| Programming language annotation | :white_check_mark: | :white_check_mark: |
| Code quality annotation | :white_check_mark: | :white_check_mark: |
| Malware annotation | :white_check_mark: | :white_check_mark: |
| Header cleanser | :white_check_mark: | :white_check_mark: |
| Semantic file ordering | :white_check_mark: | |
| License Select Annotation | :white_check_mark: | :white_check_mark: |
| Code profiler | :white_check_mark: | :white_check_mark: |
| Images | ||
| Faces | :white_check_mark: | :white_check_mark: |
| NSFW(Not Safe For Work) | :white_check_mark: | :white_check_mark: |
| People | :white_check_mark: | :white_check_mark: |
Logging configuration
DPK uses a unified logger - dpk. It can be configured, by setting the following environment variables
| Variable name | Default value | Description |
|---|---|---|
| DPK_LOG_LEVEL | INFO | The loggger level |
| DPK_LOG_FILE | None | The path to the log file, if set the log message will be stored in the file |
| DPK_LOG_JSON_HANDLER | "" | If set to any value of "true", "1", "yes", or "on" (case insensitive) the console logs will be in JSON format |
| DPK_LOG_PROPAGATION | "" | If set to any value of "true", "1", "yes", or "on" (case insensitive), the logger will propagate all log messages to its parent logger |
Contributing
Contributors are welcome to add new modules to expand to other data modalities as well as add runtime support for existing modules! Please read this for details.
Get help and support
Please feel free to connect with us using the discussion section.
MAINTAINERS
For a list of current maintainers, please see.
CHANGELOG
For the history of releases and changes, please see.
Resources
Papers, talks, presentations and tutorials
Granite open source LLM models
Citation
If you use Data-Prep-Kit in your research, please cite our paper:
@misc{wood2024dataprepkitgettingdataready,
title={Data-Prep-Kit: getting your data ready for LLM application development},
author={David Wood and Boris Lublinsky and Alexy Roytman and Shivdeep Singh
and Constantin Adam and Abdulhamid Adebayo and Sungeun An and Yuan Chi Chang
and Xuan-Hong Dang and Nirmit Desai and Michele Dolfi and Hajar Emami-Gohari
and Revital Eres and Takuya Goto and Dhiraj Joshi and Yan Koyfman
and Mohammad Nassar and Hima Patel and Paramesvaran Selvam and Yousaf Shah
and Saptha Surendran and Daiki Tsuzuku and Petros Zerfos and Shahrokh Daijavad},
year={2024},
eprint={2409.18164},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2409.18164},
}
License
All source files must include a Copyright and License header. If you would like to see the detailed LICENSE click here.
LF AI & Data
Data-Prep-Kit is hosted as a project in the LF AI & Data Foundation.
IBM ❤️ Open Source AI
The project was started by the Data for AI Models team at IBM Research.
Copyright © Data-Prep-Kit Framework - a Series of LF Projects, LLC.