{"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/sparse-is-enough-in-fine-tuning-pre-trained","title":"Sparse is Enough in Fine-tuning Pre-trained Large Language Models","arxiv_id":"2312.11875","date":"2023-12-19","proceeding":null,"authors":["Weixi Song","Zuchao Li","Lefei Zhang","Hai Zhao","Bo Du"],"abstract":"With the prevalence of pre-training-fine-tuning paradigm, how to efficiently adapt the pre-trained model to the downstream tasks has been an intriguing issue. Parameter-Efficient Fine-Tuning (PEFT) methods have been proposed for low-cost adaptation. Although PEFT has demonstrated effectiveness and been widely applied, the underlying principles are still unclear. In this paper, we adopt the PAC-Bayesian generalization error bound, viewing pre-training as a shift of prior distribution which leads to a tighter bound for generalization error. We validate this shift from the perspectives of oscillations in the loss landscape and the quasi-sparsity in gradient distribution. Based on this, we propose a gradient-based sparse fine-tuning algorithm, named Sparse Increment Fine-Tuning (SIFT), and validate its effectiveness on a range of tasks including the GLUE Benchmark and Instruction-tuning. The code is accessible at https://github.com/song-wx/SIFT/.","url_abs":"https://arxiv.org/abs/2312.11875v3","url_pdf":"https://arxiv.org/pdf/2312.11875v3.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":"sparse-is-enough-in-fine-tuning-pre-trained","repo_url":"https://github.com/song-wx/sift","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"parameter-efficient-fine-tuning","task_name":"parameter-efficient fine-tuning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.11875","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.11875"}},"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":"deterministic:regex_extraction","url":"https://github.com/song-wx/SIFT","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/song-wx/sift","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_draft_wrong":5,"ran_honours":1,"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":12,"samples":[{"code_sha256_prefix":"9a9f55f04498b3cc","entry":"SIFT","repo":"song-wx/sift","repo_kind":"official","path":"sift/sift.py","file_url":"https://github.com/song-wx/sift/blob/HEAD/sift/sift.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":"9a9f55f04498b3cc"}},{"code_sha256_prefix":"454817035cd7e70d","entry":"acc_and_f1","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/glue_benchmark/glue_metric.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/glue_benchmark/glue_metric.py","link_basis":"harvester_set","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":"454817035cd7e70d"}},{"code_sha256_prefix":"9b2dd0265fc6e6b6","entry":"encode_prompt","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/instruction_finetuning/generate_instruction.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/instruction_finetuning/generate_instruction.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b2dd0265fc6e6b6"}},{"code_sha256_prefix":"8ca6a5f9f77053c2","entry":"find_word_in_string","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/instruction_finetuning/generate_instruction.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/instruction_finetuning/generate_instruction.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8ca6a5f9f77053c2"}},{"code_sha256_prefix":"cd763eaf1ac287e7","entry":"format_example","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/mmlu/eval_mmlu.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/mmlu/eval_mmlu.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cd763eaf1ac287e7"}},{"code_sha256_prefix":"6ab745408cb8648b","entry":"format_subject","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/mmlu/eval_mmlu.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/mmlu/eval_mmlu.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6ab745408cb8648b"}},{"code_sha256_prefix":"3383488ea82b6c15","entry":"gen_prompt","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/mmlu/eval_mmlu.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/mmlu/eval_mmlu.py","link_basis":"harvester_set","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":"3383488ea82b6c15"}},{"code_sha256_prefix":"d07d04439cd1d44f","entry":"jload","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/instruction_finetuning/utils.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/instruction_finetuning/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d07d04439cd1d44f"}},{"code_sha256_prefix":"e3e13638a674e4b1","entry":"pearson_and_spearman","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/glue_benchmark/glue_metric.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/glue_benchmark/glue_metric.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e3e13638a674e4b1"}},{"code_sha256_prefix":"a5e4ad4e11cf2143","entry":"post_process_gpt3_response","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/instruction_finetuning/generate_instruction.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/instruction_finetuning/generate_instruction.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a5e4ad4e11cf2143"}},{"code_sha256_prefix":"ebb1cebbcdf9c443","entry":"openai_completion","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/instruction_finetuning/utils.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/instruction_finetuning/utils.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":"ebb1cebbcdf9c443"}},{"code_sha256_prefix":"83eba990d34db6a2","entry":"simple_accuracy","repo":"song-wx/SIFT","repo_kind":"official","path":"exp/glue_benchmark/glue_metric.py","file_url":"https://github.com/song-wx/SIFT/blob/HEAD/exp/glue_benchmark/glue_metric.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":"83eba990d34db6a2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}