Dedup, Filter, Decontaminate
Data quality is where 80% of fine-tuning gains are. Generation is cheap; curation is the moat. MinHash dedup, semantic dedup, perplexity filtering, decontamination, and quality subset selection — the full clean pipeline that turns a noisy corpus into a steering wheel.
Data quality is where 80% of fine-tuning gains are. DCLM held the model and training recipe constant and varied only the data pipeline — rigorous dedup + perplexity + quality selection beat the baseline by 6.5% absolute. Same model, same compute. Curation is the moat.
MinHash + LSH catches near-duplicates that exact hashing misses. Shingle → hash → band → verify. The LSH banding trick makes it scale beyond O(n²). Standard tools: datasketch, text-dedup.
MinHash is not enough — semantic dedup catches paraphrases. Embed every sample with a sentence-transformer, cluster, drop intra-cluster pairs with cosine ≥ 0.9. The same machinery enables quality subset selection (DCLM: quality filtering ≈ 4× compute scaling).
Perplexity filtering is two wins in one pass. Train a small LM on clean data; drop the high-perplexity tail as garbage. The NeurIPS 2025 link: low-perplexity tokens produce small gradients and mitigate catastrophic forgetting in continued pretraining.
Decontamination is non-negotiable. If your training set contains benchmark test items (MMLU, GSM8K, HumanEval, MT-Bench), every eval score you report is fiction. 13-gram matching against the test sets, every time, for every benchmark you will report.