{"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/divide-or-conquer-which-part-should-you","title":"Divide-or-Conquer? Which Part Should You Distill Your LLM?","arxiv_id":"2402.15000","date":"2024-02-22","proceeding":null,"authors":["Zhuofeng Wu","He Bai","Aonan Zhang","Jiatao Gu","VG Vinod Vydiswaran","Navdeep Jaitly","Yizhe Zhang"],"abstract":"Recent methods have demonstrated that Large Language Models (LLMs) can solve reasoning tasks better when they are encouraged to solve subtasks of the main task first. In this paper we devise a similar strategy that breaks down reasoning tasks into a problem decomposition phase and a problem solving phase and show that the strategy is able to outperform a single stage solution. Further, we hypothesize that the decomposition should be easier to distill into a smaller model compared to the problem solving because the latter requires large amounts of domain knowledge while the former only requires learning general problem solving strategies. We propose methods to distill these two capabilities and evaluate their impact on reasoning outcomes and inference cost. We find that we can distill the problem decomposition phase and at the same time achieve good generalization across tasks, datasets, and models. However, it is harder to distill the problem solving capability without losing performance and the resulting distilled model struggles with generalization. These results indicate that by using smaller, distilled problem decomposition models in combination with problem solving LLMs we can achieve reasoning with cost-efficient inference and local adaptation.","url_abs":"https://arxiv.org/abs/2402.15000v3","url_pdf":"https://arxiv.org/pdf/2402.15000v3.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":"divide-or-conquer-which-part-should-you","repo_url":"https://github.com/apple/ml-divide-or-conquer","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"problem-decomposition","task_name":"Problem Decomposition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.15000","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.15000"}},"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/apple/ml-divide-or-conquer","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":9,"unverified":2},"by_repo_kind":{"official":{"samples":11,"ran":9,"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":11,"samples":[{"code_sha256_prefix":"d7448dc053a1ef8d","entry":"add_commas","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"evaluation/evaluation_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/evaluation/evaluation_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"d7448dc053a1ef8d"}},{"code_sha256_prefix":"5d3f431e818da5b0","entry":"answer_json_to_strings","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"rejection_sampling/newselect_correct_chain_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/rejection_sampling/newselect_correct_chain_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5d3f431e818da5b0"}},{"code_sha256_prefix":"d53d01a2020004ed","entry":"completion_with_backoff","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"run_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/run_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"d53d01a2020004ed"}},{"code_sha256_prefix":"2c7f4d404b0a3c5b","entry":"extract_answer","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"evaluation/evaluation.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/evaluation/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"2c7f4d404b0a3c5b"}},{"code_sha256_prefix":"9efb8ade48dbb583","entry":"extract_answer","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"evaluation/evaluation_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/evaluation/evaluation_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9efb8ade48dbb583"}},{"code_sha256_prefix":"7e43b23b830e1fbb","entry":"extract_subqs","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"rejection_sampling/newselect_correct_chain_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/rejection_sampling/newselect_correct_chain_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7e43b23b830e1fbb"}},{"code_sha256_prefix":"cd8b6cb7b70c5349","entry":"get_last_line","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"run_gsm+drop.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/run_gsm%2Bdrop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"cd8b6cb7b70c5349"}},{"code_sha256_prefix":"ec6139a4c80e69cb","entry":"purify_preds","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"evaluation/evaluation_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/evaluation/evaluation_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ec6139a4c80e69cb"}},{"code_sha256_prefix":"4582ae4b3e09b21d","entry":"remove_space","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"rejection_sampling/newselect_correct_chain_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/rejection_sampling/newselect_correct_chain_bamb.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4582ae4b3e09b21d"}},{"code_sha256_prefix":"744090310d6e2276","entry":"ChatGPT_universal_paraphrase","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"run_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/run_bamb.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"744090310d6e2276"}},{"code_sha256_prefix":"d06a7fdfa5a8b35d","entry":"promptf","repo":"apple/ml-divide-or-conquer","repo_kind":"official","path":"run_bamb.py","file_url":"https://github.com/apple/ml-divide-or-conquer/blob/HEAD/run_bamb.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"d06a7fdfa5a8b35d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}