I Built an Open-Source Pipeline to Convert Documents into LLM Training Data
dev.to·12h·
Discuss: DEV
Preview
Report Post

Every time I wanted to fine-tune an LLM or build a RAG system, I hit the same wall: I have documents, how do I turn them into training data?

PDFs, HTML pages, JSON files, CSVs, LaTeX papers... Each project meant new scripts, no reproducibility, bloated contexts wasting tokens, and numbers silently getting corrupted.

So I built 3DCF/doc2dataset to fix this.

What It Does

  • 30+ Document Formats Supported

  • PDF, Markdown, Plain Text, HTML, XML, JSON, YAML, TOML, CSV, TSV, LaTeX, BibTeX, images with OCR (PNG, JPG, GIF, WebP), RTF, and more.

  • 5-6x Token Compression

  • Instead of dumping raw text, 3DCF creates macro-cells with layout preservation and importance scoring. Same information, fraction of the tokens.

  • NumGuard: Numeric Integrity

  • When processing finan…

Similar Posts

Loading similar posts...