{"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/dilm-distilling-dataset-into-language-model","title":"DiLM: Distilling Dataset into Language Model for Text-level Dataset Distillation","arxiv_id":"2404.00264","date":"2024-03-30","proceeding":null,"authors":["Aru Maekawa","Satoshi Kosugi","Kotaro Funakoshi","Manabu Okumura"],"abstract":"Dataset distillation aims to compress a training dataset by creating a small number of informative synthetic samples such that neural networks trained on them perform as well as those trained on the original training dataset. Current text dataset distillation methods create each synthetic sample as a sequence of word embeddings instead of a text to apply gradient-based optimization; however, such embedding-level distilled datasets cannot be used for training other models whose word embedding weights are different from the model used for distillation. To address this issue, we propose a novel text dataset distillation approach, called Distilling dataset into Language Model (DiLM), which trains a language model to generate informative synthetic training samples as text data, instead of directly optimizing synthetic samples. We evaluated DiLM on various text classification datasets and showed that distilled synthetic datasets from DiLM outperform those from current coreset selection methods. DiLM achieved remarkable generalization performance in training different types of models and in-context learning of large language models. Our code will be available at https://github.com/arumaekawa/DiLM.","url_abs":"https://arxiv.org/abs/2404.00264v1","url_pdf":"https://arxiv.org/pdf/2404.00264v1.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":"dilm-distilling-dataset-into-language-model","repo_url":"https://github.com/arumaekawa/dilm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"dataset-distillation","task_name":"Dataset Distillation"},{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"word-embeddings","task_name":"Word Embeddings"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.00264","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.00264"}},"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/arumaekawa/dilm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"unverified":2},"by_repo_kind":{"official":{"samples":12,"ran":10,"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":"78560fa4cc79bb8c","entry":"average","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"78560fa4cc79bb8c"}},{"code_sha256_prefix":"657f8371b248b814","entry":"batch_to_cuda","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"657f8371b248b814"}},{"code_sha256_prefix":"8ef672b5cb7eb85a","entry":"batch_to_cuda","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/coreset/coreset_utils.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/coreset/coreset_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ef672b5cb7eb85a"}},{"code_sha256_prefix":"235097ddb542453f","entry":"configure_optimizer","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"235097ddb542453f"}},{"code_sha256_prefix":"8c527dfae28abf79","entry":"create_train_prompt","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/evaluator.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/evaluator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c527dfae28abf79"}},{"code_sha256_prefix":"5b3995e98e91b41a","entry":"example_to_prompt","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/evaluator.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/evaluator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5b3995e98e91b41a"}},{"code_sha256_prefix":"5fd06d143e5ad4be","entry":"herding","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/coreset/herding.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/coreset/herding.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5fd06d143e5ad4be"}},{"code_sha256_prefix":"87e0c5dc751680de","entry":"l2_dist","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/coreset/coreset_utils.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/coreset/coreset_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"87e0c5dc751680de"}},{"code_sha256_prefix":"7dd5cf74e25b707e","entry":"preprocess_for_classification","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/evaluator.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/evaluator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7dd5cf74e25b707e"}},{"code_sha256_prefix":"6df27b052e7836d0","entry":"random_selection","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/coreset/random.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/coreset/random.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6df27b052e7836d0"}},{"code_sha256_prefix":"499bced10bfc04a9","entry":"get_embeddings","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/coreset/coreset_utils.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/coreset/coreset_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"499bced10bfc04a9"}},{"code_sha256_prefix":"cf0257c37dd1692f","entry":"k_centers","repo":"arumaekawa/dilm","repo_kind":"official","path":"src/coreset/k_centers.py","file_url":"https://github.com/arumaekawa/dilm/blob/HEAD/src/coreset/k_centers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf0257c37dd1692f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}