Data Deduplication (LLM)
Pull a billion web pages and you have not pulled a billion distinct documents. The same news wire runs on four hundred sites, licence texts repeat word for word, and scraped pages carry each other's boilerplate. Data deduplication is the step that finds those repeats before training and removes them.
How duplicates are foundTwo levels work together. Exact deduplication hashes documents, or fixed-length substrings, so that every repeated span above a threshold — say fifty tokens — can be deleted; suffix arrays make this tractable at corpus scale. Near-duplicate detection needs fuzzy matching, which is where MinHash with locality-sensitive hashing earns its place: it estimates overlap between documents from small signatures, so billions of pages can be clustered without comparing every pair. The pipelines behind C4, RefinedWeb and FineWeb apply both, and the discarded fraction is routinely larger than the kept one.
What it changes- Fewer training steps for the same quality — duplicate tokens cost compute and teach nothing new.
- Less verbatim memorisation, which directly lowers the chance the model reproduces private or copyrighted text word for word.
- Honest evaluation: duplicated pages leak benchmark items into the training set and inflate scores.
Deduplication is unglamorous and decisive. Of everything done to a web-scale corpus before training, it is the step whose absence is visible in the finished model: one trained on an undeduplicated crawl is both weaker and leakier than its token count suggests.
Data deduplication removes repeated documents and repeated long substrings from a pretraining corpus, using exact hashing for identical spans and MinHash-based fuzzy matching for near-duplicates. Web crawls carry enormous redundancy, so the step recovers compute that would be spent on tokens teaching nothing new, cuts verbatim memorisation of training text, and keeps benchmark items from leaking in through duplicated pages and inflating evaluation scores.
Imagine revising from a stack of a thousand photocopies, then discovering that nine hundred of them are copies of the same six pages. You would waste days and learn very little. Text collected from the web is exactly like that stack — the same article, notice or page template turns up over and over. Data deduplication is the clean-up pass that throws out the repeats before a language system starts reading. It saves a staggering amount of expensive computing time, and it stops the system memorising particular passages word for word — which is how somebody's private details or someone else's writing can end up being repeated back to you.