AI training data
Dataset overlap: how do AI labs check a dataset against the public web?
Dataset overlap is the part of your data a lab already has; here is how labs measure it and how to measure it first.
Published · 7 min read

The short answer
Labs split text into short word sequences and match them against corpora they already hold: MinHash finds near-duplicate documents, and exact matching, often on 13-word spans, finds copied passages and leaked test questions. Matches are removed before training, so overlapping text adds little. A seller can run the same test first with free indexes such as infini-gram.
Key takeaways
- Published pipelines removed between about 3% and 90% of their data as duplicates, depending on the corpus and how wide the comparison was.
- In our infini-gram run on 2.6 trillion tokens, an invented 21-token support-ticket sentence had no match; the MIT licence's opening line had 906,471.
- A 2024 study of 30 model developers found just 9 report train-test overlap, so a seller rarely sees a buyer's own numbers.
What is dataset overlap, and why do buyers check it?
Dataset overlap is the share of a dataset that already exists in text a buyer has trained on or can collect free, mostly the public web. Labs buy what their models haven't seen, so overlap is the part they won't pay for.
Repeated text makes models memorise: Lee and colleagues found over 1% of unprompted model output was copied training data, and deduplication cut that tenfold. And leaked test questions inflate benchmark scores.
- Less memorised text after deduplication
- 10×
- Model developers that report train-test overlap
- 9 of 30
Which methods do labs publish?
There are two kinds: fuzzy matching finds documents that are mostly the same, and exact matching finds a copied run of words; published pipelines use both.
| Pipeline | Near-duplicate check | Exact match, scope or lookup | Source |
|---|---|---|---|
| GPT-3 (OpenAI) | MinHashLSH with 10 hashes, within each dataset | 13-word overlap with test sets; removed the match plus 200 characters around it | Brown et al. (2020), Appendices A and C |
| C4 study (Lee et al.) | MinHash on 5-grams with a 9,000-hash signature | Suffix array finding repeated 50-token runs | Lee et al. (2022) |
| RefinedWeb (Falcon) | MinHash on documents | Exact substrings via suffix arrays, after URL deduplication | Penedo et al. (2023) |
| FineWeb (Hugging Face) | MinHash on 5-grams: 112 hashes in 14 buckets of 8, aimed at 75% similarity | Run per crawl snapshot, not across all 96 | Penedo et al. (2024) |
| The Stack v2 (BigCode) | Near-deduplication on top of exact deduplication | Public 'Am I in The Stack?' lookup and an opt-out | Dataset card |
GPT-3's team ignored 13-word matches found in over 10 training documents, mostly common phrases and legal boilerplate. A bug left some overlaps in, so the paper reports scores on cleaned test subsets instead.
How much do the checks remove?
Between about 3% and 90% in the published cases; the wider the comparison, the more goes. Each figure measures something slightly different, so read the last column.
| Corpus and check | Share removed or flagged | What was compared |
|---|---|---|
| C4, near-duplicates | 3.04% | C4's examples with each other (Lee et al.) |
| C4, exact 50-token runs | 7.18% | Tokens removed by exact substring matching (Lee et al.) |
| GPT-3 sets, fuzzy | 10% | Average fall in size of each training set, fuzzy matching (Brown et al.) |
| The Stack v2 files | 40% | Permissively licensed files that were exact or near duplicates (dataset card) |
| RefinedWeb, both steps | 50% | About half removed by exact and MinHash steps (Penedo et al., 2023) |
| FineWeb 2013, global | 90% | Oldest (2013) snapshot against all 96; 10% kept (Penedo et al., 2024) |

FineWeb's result matters most to sellers: deduplicated against every later crawl, 90% of the 2013 crawl went, because old public text keeps being copied. Long-public text is the part most likely to vanish.
Can a seller check for overlap before the buyer does?
Yes, with free public indexes. They cover open corpora, not a lab's own crawl, so a result is a lower bound.
- 1
Take a random sample
Pull 50 to 100 random passages, not the best ones, and keep the list.
- 2
Search long spans in infini-gram
Its free web page and API count exact matches in open corpora such as Dolma v1.7 (2.6 trillion tokens), RedPajama, the Pile and C4. Use spans of 13 tokens or more.
- 3
Check code by repository
BigCode's 'Am I in The Stack?' page says whether a public repository is in The Stack.
- 4
Check a website by URL
Common Crawl's index server searches its URL index for any crawl, showing whether a site's pages were collected.
- 5
Write the rate down
Record how many passages matched, what kind of text, and the date, in the dataset's datasheet.
What did our own overlap check find?
Public text and boilerplate matched thousands of times; three sentences we wrote for a fictional company matched nothing. We searched Dolma v1.7 through infini-gram's API on 2026-11-23. Tokens are Llama-2 word pieces.
| Text searched | Tokens | Matches |
|---|---|---|
| MIT licence opening: 'Permission is hereby granted, free of charge, to any person obtaining a copy' | 18 | 906,471 |
| Python line: 'import numpy as np' | 4 | 548,279 |
| Opening line of A Tale of Two Cities | 13 | 5,937 |
| Governing-law clause: 'This Agreement shall be governed by and construed in accordance with the laws of the State of' | 22 | 3,591 |
| Invented support reply: 'Thank you for contacting customer support. We have received your request' | 13 | 0 |
| Invented ticket: 'The label printer at the Dunmore depot skips every third pallet tag since the firmware update' | 21 | 0 |
| Invented code comment about a ledger sync | 16 | 0 |
Two results surprised us. The invented support reply sounds like a template, yet its 13 tokens had no match (its first 7 matched 45 times). And licence text dwarfed everything: copied licence headers in a codebase will show as overlap a buyer simply strips.
What does overlap mean for a sale?
The buyer pays for what survives deduplication, so measure that and lead with it.
Our page on code datasets explains why private repositories sell: most coding models have already trained on public code. An overlap check shows a repository really is private.
What this post doesn't cover
Exact search misses paraphrases and translations, and public indexes don't hold a lab's own crawl, so zero matches doesn't prove text is unseen. Images, audio and video need other methods. Testing whether a model already saw a text is harder: one 2025 study's best score was 0.82 where 0.5 is chance.
Overlap says nothing about whether you may sell the data: ownership, personal data and licences are separate checks for a lawyer.
Sources
9 sources · checked Nov 23, 2026
The DataBroker team checked the facts on this page against 9 public sources, last on .
- Lee et al., Deduplicating Training Data Makes Language Models Better (ACL 2022)Memorisation, C4 figures, settings · Checked
- Brown et al., Language Models are Few-Shot Learners (2020)GPT-3's deduplication and test filter · Checked
- Penedo et al., The RefinedWeb Dataset for Falcon LLM (2023)RefinedWeb's steps, about 50% removed · Checked
- Penedo et al., The FineWeb Datasets (2024)FineWeb's settings, 2013 crawl result · Checked
- BigCode, The Stack v2 dataset cardDuplicates, 'Am I in The Stack?' · Checked
- Zhang et al., Language model developers should report train-test overlap (2024, rev. 2025)9 of 30 developers report overlap · Checked
- infini-gram: infini-gram.io and its API documentation, infini-gram.readthedocs.ioFree API, corpora and sizes; our run · Checked
- Common Crawl Index ServerSearch the URL index for any crawl · Checked
- Beyond Public Access in LLM Pre-Training Data (2025, rev. 2026)Membership test scoring 0.82 where 0.5 is chance · Checked
Dataset overlap FAQ
What is a 13-gram overlap?
A run of 13 consecutive words found both in a training set and in another text, such as a test question. GPT-3's team treated such test examples as possibly contaminated.
Will a buyer pay for data that is already on the web?
Usually not: published pipelines remove duplicates before training, so buyers pay for what is new.
How can I check whether my code is in an AI training set?
BigCode's 'Am I in The Stack?' page checks a public repository, and the dataset card explains opting out. Most labs' training sets can't be searched.
Is infini-gram free to use?
Yes: a web interface for small volumes and a free API, with no stated rate limit.
Related
- Code datasets for AI training
Code datasets range from open corpora built from public repositories to private codebases that AI labs now buy from shut-down startups.
- Data provenance
Data provenance tells a buyer where a dataset came from, who produced it, how, and under what rights.
- What is a datasheet for a dataset
A datasheet for a dataset answers 57 standard questions about your data; here is what buyers read in one and how to write it.
- What is a training data cutoff?
A training data cutoff is where a model's knowledge stops; here is how far behind models ship and what that means for data sellers.
- How AI companies get training data
How do AI companies get training data? From five sources: web crawls, licensed archives, paid human work, synthetic data and their own users.
- AI training data
AI training data licensing explained: which datasets labs want, publicly reported deal values, and the copyright and transparency rules that now apply.
More from the blog
- Exclusive data license
An exclusive data license is worth what the seller gives up: the other buyers it can no longer license for the term.
- Data broker vs business broker
Data broker vs business broker is mostly a question of what changes hands: a whole company once, or a right to use data.
- Who can approve a data sale at a company?
Who can approve a data sale depends on the company's form, the deal's size and whose promises cover the data.
Join the DataBroker academy
The DataBroker academy and tools: find companies with data to sell, price it, license it and close the deal.







