{"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/pyra-parallel-yielding-re-activation-for","title":"PYRA: Parallel Yielding Re-Activation for Training-Inference Efficient Task Adaptation","arxiv_id":"2403.09192","date":"2024-03-14","proceeding":null,"authors":["Yizhe Xiong","Hui Chen","Tianxiang Hao","Zijia Lin","Jungong Han","Yuesong Zhang","Guoxin Wang","Yongjun Bao","Guiguang Ding"],"abstract":"Recently, the scale of transformers has grown rapidly, which introduces considerable challenges in terms of training overhead and inference efficiency in the scope of task adaptation. Existing works, namely Parameter-Efficient Fine-Tuning (PEFT) and model compression, have separately investigated the challenges. However, PEFT cannot guarantee the inference efficiency of the original backbone, especially for large-scale models. Model compression requires significant training costs for structure searching and re-training. Consequently, a simple combination of them cannot guarantee accomplishing both training efficiency and inference efficiency with minimal costs. In this paper, we propose a novel Parallel Yielding Re-Activation (PYRA) method for such a challenge of training-inference efficient task adaptation. PYRA first utilizes parallel yielding adaptive weights to comprehensively perceive the data distribution in downstream tasks. A re-activation strategy for token modulation is then applied for tokens to be merged, leading to calibrated token features. Extensive experiments demonstrate that PYRA outperforms all competing methods under both low compression rate and high compression rate, demonstrating its effectiveness and superiority in maintaining both training efficiency and inference efficiency for large-scale foundation models. Our code is available at https://github.com/THU-MIG/PYRA.","url_abs":"https://arxiv.org/abs/2403.09192v4","url_pdf":"https://arxiv.org/pdf/2403.09192v4.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":"pyra-parallel-yielding-re-activation-for","repo_url":"https://github.com/thu-mig/pyra","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"model-compression","task_name":"Model Compression"},{"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=2403.09192","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.09192"}},"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/thu-mig/pyra","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/THU-MIG/PYRA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"ran_honours":2,"ran_fixture":3,"unverified":1},"by_repo_kind":{"official":{"samples":16,"ran":15,"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":"b6129d06b30c292b","entry":"bipartite_soft_matching","repo":"thu-mig/pyra","repo_kind":"official","path":"model/adaptive_merge.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/adaptive_merge.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":"b6129d06b30c292b"}},{"code_sha256_prefix":"4d972cb75e0ce17d","entry":"build_dataset","repo":"thu-mig/pyra","repo_kind":"official","path":"lib/datasets.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/lib/datasets.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":"4d972cb75e0ce17d"}},{"code_sha256_prefix":"4352f21759f08de9","entry":"build_transform","repo":"thu-mig/pyra","repo_kind":"official","path":"lib/datasets.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/lib/datasets.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":"4352f21759f08de9"}},{"code_sha256_prefix":"969e8250d805a154","entry":"do_nothing","repo":"thu-mig/pyra","repo_kind":"official","path":"model/adaptive_merge.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/adaptive_merge.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"969e8250d805a154"}},{"code_sha256_prefix":"39eace7e2822504f","entry":"drop_path","repo":"thu-mig/pyra","repo_kind":"official","path":"model/utils.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39eace7e2822504f"}},{"code_sha256_prefix":"c2766d58552b5f37","entry":"even","repo":"thu-mig/pyra","repo_kind":"official","path":"model/utils.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c2766d58552b5f37"}},{"code_sha256_prefix":"8b5a189b881cc7e5","entry":"get_merging_schedule","repo":"thu-mig/pyra","repo_kind":"official","path":"model/tome.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/tome.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":"8b5a189b881cc7e5"}},{"code_sha256_prefix":"c41aa8b3b7005800","entry":"init_pyra_scale","repo":"THU-MIG/PYRA","repo_kind":"official","path":"model/adaptive_merge.py","file_url":"https://github.com/THU-MIG/PYRA/blob/HEAD/model/adaptive_merge.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c41aa8b3b7005800"}},{"code_sha256_prefix":"6ee649c2dcd0e4a1","entry":"make_tome_class","repo":"thu-mig/pyra","repo_kind":"official","path":"model/tome.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/tome.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":"6ee649c2dcd0e4a1"}},{"code_sha256_prefix":"04ae1a80bf45d2eb","entry":"optimizer_kwargs","repo":"thu-mig/pyra","repo_kind":"official","path":"model/optim_factory.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/optim_factory.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":"04ae1a80bf45d2eb"}},{"code_sha256_prefix":"94e8f254ce489a4b","entry":"parse_r","repo":"thu-mig/pyra","repo_kind":"official","path":"model/tome.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/tome.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"94e8f254ce489a4b"}},{"code_sha256_prefix":"c481267a68f1cd79","entry":"pre_process","repo":"thu-mig/pyra","repo_kind":"official","path":"model/optim_factory.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/optim_factory.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":"c481267a68f1cd79"}},{"code_sha256_prefix":"191b2735955d18f4","entry":"resize_pos_embed","repo":"thu-mig/pyra","repo_kind":"official","path":"model/vision_transformer_timm.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/vision_transformer_timm.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"191b2735955d18f4"}},{"code_sha256_prefix":"55b52c9838727c38","entry":"test_model_latency","repo":"thu-mig/pyra","repo_kind":"official","path":"engine.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/engine.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":"55b52c9838727c38"}},{"code_sha256_prefix":"02566da69866c48c","entry":"trunc_normal_","repo":"thu-mig/pyra","repo_kind":"official","path":"model/utils.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"02566da69866c48c"}},{"code_sha256_prefix":"6d8a1f8a0697180f","entry":"checkpoint_filter_fn","repo":"thu-mig/pyra","repo_kind":"official","path":"model/vision_transformer_timm.py","file_url":"https://github.com/thu-mig/pyra/blob/HEAD/model/vision_transformer_timm.py","link_basis":"harvester_set","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":"6d8a1f8a0697180f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}