{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/deduplicating-training-data-makes-language","title":"Deduplicating Training Data Makes Language Models Better","arxiv_id":"2107.06499","date":"2021-07-14","proceeding":"ACL 2022 5","authors":["Katherine Lee","Daphne Ippolito","Andrew Nystrom","Chiyuan Zhang","Douglas Eck","Chris Callison-Burch","Nicholas Carlini"],"abstract":"We find that existing language modeling datasets contain many near-duplicate examples and long repetitive substrings. As a result, over 1% of the unprompted output of language models trained on these datasets is copied verbatim from the training data. We develop two tools that allow us to deduplicate training datasets -- for example removing from C4 a single 61 word English sentence that is repeated over 60,000 times. Deduplication allows us to train models that emit memorized text ten times less frequently and require fewer train steps to achieve the same or better accuracy. We can also reduce train-test overlap, which affects over 4% of the validation set of standard datasets, thus allowing for more accurate evaluation. We release code for reproducing our work and performing dataset deduplication at https://github.com/google-research/deduplicate-text-datasets.","url_abs":"https://arxiv.org/abs/2107.06499v2","url_pdf":"https://arxiv.org/pdf/2107.06499v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"deduplicating-training-data-makes-language","repo_url":"https://github.com/google-research/deduplicate-text-datasets","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"deduplicating-training-data-makes-language","repo_url":"https://github.com/worksapplications/uzushio","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.06499","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.06499"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/worksapplications/uzushio","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-research/deduplicate-text-datasets","reach":null}],"summary":{"unverified":3},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"listed":{"samples":2,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"5f1f65c1474cec33","entry":"inverse_array","repo":"worksapplications/uzushio","repo_kind":"listed","path":"legacy/suffixarray.py","file_url":"https://github.com/worksapplications/uzushio/blob/HEAD/legacy/suffixarray.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5f1f65c1474cec33"}},{"code_sha256_prefix":"7e77cf53f447fc1c","entry":"to_int_keys","repo":"worksapplications/uzushio","repo_kind":"listed","path":"legacy/suffixarray.py","file_url":"https://github.com/worksapplications/uzushio/blob/HEAD/legacy/suffixarray.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7e77cf53f447fc1c"}},{"code_sha256_prefix":"79141c7816c4e97a","entry":"tok","repo":"google-research/deduplicate-text-datasets","repo_kind":"official","path":"scripts/load_dataset.py","file_url":"https://github.com/google-research/deduplicate-text-datasets/blob/HEAD/scripts/load_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"79141c7816c4e97a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}