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.

By

Published · 7 min read

Illustration: a lighthouse beam sweeping the sea towards a distant ship

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
Source: Lee et al. (2022); Zhang et al. (2024)
The common shape of the published pipelines in the table below.

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.

Compiled by DataBroker from each paper or dataset card, read 2026-11-23. Closed labs' current pipelines are not public.
PipelineNear-duplicate checkExact match, scope or lookupSource
GPT-3 (OpenAI)MinHashLSH with 10 hashes, within each dataset13-word overlap with test sets; removed the match plus 200 characters around itBrown et al. (2020), Appendices A and C
C4 study (Lee et al.)MinHash on 5-grams with a 9,000-hash signatureSuffix array finding repeated 50-token runsLee et al. (2022)
RefinedWeb (Falcon)MinHash on documentsExact substrings via suffix arrays, after URL deduplicationPenedo et al. (2023)
FineWeb (Hugging Face)MinHash on 5-grams: 112 hashes in 14 buckets of 8, aimed at 75% similarityRun per crawl snapshot, not across all 96Penedo et al. (2024)
The Stack v2 (BigCode)Near-deduplication on top of exact deduplicationPublic 'Am I in The Stack?' lookup and an opt-outDataset 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.

Compiled by DataBroker from the papers and dataset card in Sources, read 2026-11-23. Shares are as each source states them.
Corpus and checkShare removed or flaggedWhat was compared
C4, near-duplicates3.04%C4's examples with each other (Lee et al.)
C4, exact 50-token runs7.18%Tokens removed by exact substring matching (Lee et al.)
GPT-3 sets, fuzzy10%Average fall in size of each training set, fuzzy matching (Brown et al.)
The Stack v2 files40%Permissively licensed files that were exact or near duplicates (dataset card)
RefinedWeb, both steps50%About half removed by exact and MinHash steps (Penedo et al., 2023)
FineWeb 2013, global90%Oldest (2013) snapshot against all 96; 10% kept (Penedo et al., 2024)
Bar chart of the share removed or flagged as duplicates in six published cases: 3.04% and 7.18% in C4, 10% in GPT-3's sets, 40% in The Stack v2, 50% in RefinedWeb and 90% of FineWeb's oldest crawl.
Drawn by DataBroker from the table above.

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. 1

    Take a random sample

    Pull 50 to 100 random passages, not the best ones, and keep the list.

  2. 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. 3

    Check code by repository

    BigCode's 'Am I in The Stack?' page says whether a public repository is in The Stack.

  4. 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. 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.

Our infini-gram run, 2026-11-23, index v4_dolma-v1_7_llama. The invented sentences describe a fictional company.
Text searchedTokensMatches
MIT licence opening: 'Permission is hereby granted, free of charge, to any person obtaining a copy'18906,471
Python line: 'import numpy as np'4548,279
Opening line of A Tale of Two Cities135,937
Governing-law clause: 'This Agreement shall be governed by and construed in accordance with the laws of the State of'223,591
Invented support reply: 'Thank you for contacting customer support. We have received your request'130
Invented ticket: 'The label printer at the Dunmore depot skips every third pallet tag since the firmware update'210
Invented code comment about a ledger sync160
Why labs use long spans: almost any three words are on the web.

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.

The order a buyer's pipeline sorts your data in, from the methods above.

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 .

  1. Lee et al., Deduplicating Training Data Makes Language Models Better (ACL 2022)Memorisation, C4 figures, settings · Checked
  2. Brown et al., Language Models are Few-Shot Learners (2020)GPT-3's deduplication and test filter · Checked
  3. Penedo et al., The RefinedWeb Dataset for Falcon LLM (2023)RefinedWeb's steps, about 50% removed · Checked
  4. Penedo et al., The FineWeb Datasets (2024)FineWeb's settings, 2013 crawl result · Checked
  5. BigCode, The Stack v2 dataset cardDuplicates, 'Am I in The Stack?' · Checked
  6. Zhang et al., Language model developers should report train-test overlap (2024, rev. 2025)9 of 30 developers report overlap · Checked
  7. infini-gram: infini-gram.io and its API documentation, infini-gram.readthedocs.ioFree API, corpora and sizes; our run · Checked
  8. Common Crawl Index ServerSearch the URL index for any crawl · Checked
  9. 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

Join the DataBroker academy

The DataBroker academy and tools: find companies with data to sell, price it, license it and close the deal.