{"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/tagcos-task-agnostic-gradient-clustered","title":"TAGCOS: Task-agnostic Gradient Clustered Coreset Selection for Instruction Tuning Data","arxiv_id":"2407.15235","date":"2024-07-21","proceeding":null,"authors":["Jipeng Zhang","Yaxuan Qin","Renjie Pi","Weizhong Zhang","Rui Pan","Tong Zhang"],"abstract":"Instruction tuning has achieved unprecedented success in NLP, turning large language models into versatile chatbots. However, the increasing variety and volume of instruction datasets demand significant computational resources. To address this, it is essential to extract a small and highly informative subset (i.e., Coreset) that achieves comparable performance to the full dataset. Achieving this goal poses non-trivial challenges: 1) data selection requires accurate data representations that reflect the training samples' quality, 2) considering the diverse nature of instruction datasets, and 3) ensuring the efficiency of the coreset selection algorithm for large models. To address these challenges, we propose Task-Agnostic Gradient Clustered COreset Selection (TAGCOS). Specifically, we leverage sample gradients as the data representations, perform clustering to group similar data, and apply an efficient greedy algorithm for coreset selection. Experimental results show that our algorithm, selecting only 5% of the data, surpasses other unsupervised methods and achieves performance close to that of the full dataset.","url_abs":"https://arxiv.org/abs/2407.15235v1","url_pdf":"https://arxiv.org/pdf/2407.15235v1.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":"tagcos-task-agnostic-gradient-clustered","repo_url":"https://github.com/2003pro/tagcos","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.15235","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.15235"}},"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/2003pro/tagcos","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":11},"by_repo_kind":{"official":{"samples":16,"ran":5,"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":16,"samples":[{"code_sha256_prefix":"9156cc2e9bf4b792","entry":"OrthogonalMP_REG_Parallel","repo":"2003pro/tagcos","repo_kind":"official","path":"utils/omp.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/utils/omp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9156cc2e9bf4b792"}},{"code_sha256_prefix":"a0e56e68f27c8749","entry":"get_bbh_dataset","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/get_validation_dataset.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/get_validation_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a0e56e68f27c8749"}},{"code_sha256_prefix":"d892e897cba5c5c8","entry":"get_tydiqa_dataset","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/get_validation_dataset.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/get_validation_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d892e897cba5c5c8"}},{"code_sha256_prefix":"20318f8ce08c207c","entry":"load_embedding_batch","repo":"2003pro/tagcos","repo_kind":"official","path":"utils/omp.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/utils/omp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"20318f8ce08c207c"}},{"code_sha256_prefix":"f548a6791aa8e216","entry":"make_sample","repo":"2003pro/tagcos","repo_kind":"official","path":"script/split_sharegpt_conversations.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/script/split_sharegpt_conversations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f548a6791aa8e216"}},{"code_sha256_prefix":"25035506ff07d0a3","entry":"encode_data","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/get_training_dataset.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/get_training_dataset.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"25035506ff07d0a3"}},{"code_sha256_prefix":"fc5b455108e53a6e","entry":"get_data_statistics","repo":"2003pro/tagcos","repo_kind":"official","path":"train/data_arguments.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/train/data_arguments.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc5b455108e53a6e"}},{"code_sha256_prefix":"ed43dd7816626e87","entry":"get_max_saved_index","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/collect_grad_reps.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/collect_grad_reps.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed43dd7816626e87"}},{"code_sha256_prefix":"808c09bce5840bb9","entry":"get_output","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/collect_grad_reps.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/collect_grad_reps.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"808c09bce5840bb9"}},{"code_sha256_prefix":"60e79b646b63ed0d","entry":"get_training_dataset","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/get_training_dataset.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/get_training_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"60e79b646b63ed0d"}},{"code_sha256_prefix":"312258b87e676409","entry":"load_raw_dataset","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/get_training_dataset.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/get_training_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"312258b87e676409"}},{"code_sha256_prefix":"12b6473bde25b1dd","entry":"none_or_str","repo":"2003pro/tagcos","repo_kind":"official","path":"train/data_arguments.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/train/data_arguments.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"12b6473bde25b1dd"}},{"code_sha256_prefix":"08f4816632095bc7","entry":"should_be_filtered","repo":"2003pro/tagcos","repo_kind":"official","path":"utils/reformat_datasets.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/utils/reformat_datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"08f4816632095bc7"}},{"code_sha256_prefix":"7a3f5964eb76ddf3","entry":"split_all","repo":"2003pro/tagcos","repo_kind":"official","path":"script/split_sharegpt_conversations.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/script/split_sharegpt_conversations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7a3f5964eb76ddf3"}},{"code_sha256_prefix":"6e9bdd644dfa7113","entry":"split_one_sample","repo":"2003pro/tagcos","repo_kind":"official","path":"script/split_sharegpt_conversations.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/script/split_sharegpt_conversations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e9bdd644dfa7113"}},{"code_sha256_prefix":"5d4f58c63866080e","entry":"tokenize","repo":"2003pro/tagcos","repo_kind":"official","path":"data_selection/get_validation_dataset.py","file_url":"https://github.com/2003pro/tagcos/blob/HEAD/data_selection/get_validation_dataset.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5d4f58c63866080e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}