{"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/emr-merging-tuning-free-high-performance","title":"EMR-Merging: Tuning-Free High-Performance Model Merging","arxiv_id":"2405.17461","date":"2024-05-23","proceeding":null,"authors":["Chenyu Huang","Peng Ye","Tao Chen","Tong He","Xiangyu Yue","Wanli Ouyang"],"abstract":"The success of pretrain-finetune paradigm brings about the release of numerous model weights. In this case, merging models finetuned on different tasks to enable a single model with multi-task capabilities is gaining increasing attention for its practicability. Existing model merging methods usually suffer from (1) significant performance degradation or (2) requiring tuning by additional data or training. In this paper, we rethink and analyze the existing model merging paradigm. We discover that using a single model's weights can hardly simulate all the models' performance. To tackle this issue, we propose Elect, Mask & Rescale-Merging (EMR-Merging). We first (a) elect a unified model from all the model weights and then (b) generate extremely lightweight task-specific modulators, including masks and rescalers, to align the direction and magnitude between the unified model and each specific model, respectively. EMR-Merging is tuning-free, thus requiring no data availability or any additional training while showing impressive performance. We find that EMR-Merging shows outstanding performance compared to existing merging methods under different classical and newly-established settings, including merging different numbers of vision models (up to 30), NLP models, PEFT models, and multi-modal models.","url_abs":"https://arxiv.org/abs/2405.17461v2","url_pdf":"https://arxiv.org/pdf/2405.17461v2.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":"emr-merging-tuning-free-high-performance","repo_url":"https://github.com/harveyhuang18/emr_merging","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-retrieval","task_name":"Image Retrieval"},{"task_slug":"text-classification","task_name":"Text Classification"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.17461","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.17461"}},"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/harveyhuang18/emr_merging","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":8,"ran":4,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":15,"ran":13,"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":15,"samples":[{"code_sha256_prefix":"a19cc1dfa848e7f9","entry":"cola_tokenize_function","repo":"harveyhuang18/EMR_Merging","repo_kind":"official","path":"merge_lm/merge_gpt_glue.py","file_url":"https://github.com/harveyhuang18/EMR_Merging/blob/HEAD/merge_lm/merge_gpt_glue.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a19cc1dfa848e7f9"}},{"code_sha256_prefix":"94b554afac0917f0","entry":"EMR_merge","repo":"harveyhuang18/EMR_Merging","repo_kind":"official","path":"merge_beit3/merge_beit.py","file_url":"https://github.com/harveyhuang18/EMR_Merging/blob/HEAD/merge_beit3/merge_beit.py","link_basis":"first_harvest_node","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":"94b554afac0917f0"}},{"code_sha256_prefix":"353d64feabe7458e","entry":"TA_merge","repo":"harveyhuang18/EMR_Merging","repo_kind":"official","path":"merge_beit3/merge_beit.py","file_url":"https://github.com/harveyhuang18/EMR_Merging/blob/HEAD/merge_beit3/merge_beit.py","link_basis":"first_harvest_node","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":"353d64feabe7458e"}},{"code_sha256_prefix":"860bf587f2fbf4e0","entry":"add_ptm_to_tv","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/ties_merging_utils.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/ties_merging_utils.py","link_basis":"plan_row","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":"860bf587f2fbf4e0"}},{"code_sha256_prefix":"3053d2bdc3ea5c89","entry":"create_log_dir","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/main_emr_merging.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/main_emr_merging.py","link_basis":"plan_row","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":"3053d2bdc3ea5c89"}},{"code_sha256_prefix":"8d36051d98b72932","entry":"emr_merge","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/main_emr_30_vits.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/main_emr_30_vits.py","link_basis":"first_harvest_node","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":"8d36051d98b72932"}},{"code_sha256_prefix":"6398340aba15d719","entry":"eval_single_dataset","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/main_emr_30_vits.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/main_emr_30_vits.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":"6398340aba15d719"}},{"code_sha256_prefix":"3a22253e8c88c3ce","entry":"filt_param_to_merge","repo":"harveyhuang18/EMR_Merging","repo_kind":"official","path":"merge_beit3/merge_beit.py","file_url":"https://github.com/harveyhuang18/EMR_Merging/blob/HEAD/merge_beit3/merge_beit.py","link_basis":"first_harvest_node","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":"3a22253e8c88c3ce"}},{"code_sha256_prefix":"99462e4ad36a59db","entry":"mask_input_with_mask_rate","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_lm/model_merging_methods/mask_weights_utils.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_lm/model_merging_methods/mask_weights_utils.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":"99462e4ad36a59db"}},{"code_sha256_prefix":"fd703f1376ae3362","entry":"mnli_tokenize_function","repo":"harveyhuang18/EMR_Merging","repo_kind":"official","path":"merge_lm/merge_gpt_glue.py","file_url":"https://github.com/harveyhuang18/EMR_Merging/blob/HEAD/merge_lm/merge_gpt_glue.py","link_basis":"first_harvest_node","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":"fd703f1376ae3362"}},{"code_sha256_prefix":"637540089f33276d","entry":"mrpc_tokenize_function","repo":"harveyhuang18/EMR_Merging","repo_kind":"official","path":"merge_lm/merge_gpt_glue.py","file_url":"https://github.com/harveyhuang18/EMR_Merging/blob/HEAD/merge_lm/merge_gpt_glue.py","link_basis":"first_harvest_node","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":"637540089f33276d"}},{"code_sha256_prefix":"72391ca34e9a8cfe","entry":"state_dict_to_vector","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/ties_merging_utils.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/ties_merging_utils.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":"72391ca34e9a8cfe"}},{"code_sha256_prefix":"bf6efec91354af72","entry":"vector_to_state_dict","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/ties_merging_utils.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/ties_merging_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bf6efec91354af72"}},{"code_sha256_prefix":"5375fc5c7809c769","entry":"create_log_dir","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_vit/src/main_emr_30_vits.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_vit/src/main_emr_30_vits.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":"5375fc5c7809c769"}},{"code_sha256_prefix":"8f1a44ab20956301","entry":"normalize_word","repo":"harveyhuang18/emr_merging","repo_kind":"official","path":"merge_beit3/glossary.py","file_url":"https://github.com/harveyhuang18/emr_merging/blob/HEAD/merge_beit3/glossary.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":"8f1a44ab20956301"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}