{"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/weak-to-strong-search-align-large-language","title":"Weak-to-Strong Search: Align Large Language Models via Searching over Small Language Models","arxiv_id":"2405.19262","date":"2024-05-29","proceeding":null,"authors":["Zhanhui Zhou","Zhixuan Liu","Jie Liu","Zhichen Dong","Chao Yang","Yu Qiao"],"abstract":"Large language models are usually fine-tuned to align with human preferences. However, fine-tuning a large language model can be challenging. In this work, we introduce $\\textit{weak-to-strong search}$, framing the alignment of a large language model as a test-time greedy search to maximize the log-probability difference between small tuned and untuned models while sampling from the frozen large model. This method serves both as (1) a compute-efficient model up-scaling strategy that avoids directly tuning the large model and as (2) an instance of weak-to-strong generalization that enhances a strong model with weak test-time guidance. Empirically, we demonstrate the flexibility of weak-to-strong search across different tasks. In controlled-sentiment generation and summarization, we use tuned and untuned $\\texttt{gpt2}$s to improve the alignment of large models without additional training. Crucially, in a more difficult instruction-following benchmark, AlpacaEval 2.0, we show that reusing off-the-shelf small models (e.g., $\\texttt{zephyr-7b-beta}$ and its untuned version) can improve the length-controlled win rates of both white-box and black-box large models against $\\texttt{gpt-4-turbo}$ (e.g., $34.4\\% \\rightarrow 37.9\\%$ for $\\texttt{Llama-3-70B-Instruct}$ and $16.0\\% \\rightarrow 20.1\\%$ for $\\texttt{gpt-3.5-turbo-instruct}$), despite the small models' low win rates $\\approx 10.0\\%$.","url_abs":"https://arxiv.org/abs/2405.19262v3","url_pdf":"https://arxiv.org/pdf/2405.19262v3.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":"weak-to-strong-search-align-large-language","repo_url":"https://github.com/zhziszz/weak-to-strong-search","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"instruction-following","task_name":"Instruction Following"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.19262","atlas_url":"https://app.syntology.ai/?focus=2405.19262","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.19262"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/zhziszz/weak-to-strong-search","reach":null}],"summary":{"ran":2,"ran_fixture":2,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":6,"samples":[{"code_sha256_prefix":"1dcadf7dfe0b4e22","entry":"ScorerInput","repo":"zhziszz/weak-to-strong-search","repo_kind":"official","path":"src/inference_time_alignment/decoders/cbs.py","file_url":"https://github.com/zhziszz/weak-to-strong-search/blob/HEAD/src/inference_time_alignment/decoders/cbs.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":"1dcadf7dfe0b4e22"}},{"code_sha256_prefix":"6168a0530a097ba1","entry":"StopOnStringCriteria","repo":"zhziszz/weak-to-strong-search","repo_kind":"official","path":"src/inference_time_alignment/decoders/cbs.py","file_url":"https://github.com/zhziszz/weak-to-strong-search/blob/HEAD/src/inference_time_alignment/decoders/cbs.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":"6168a0530a097ba1"}},{"code_sha256_prefix":"a2f3046c86afc453","entry":"extract_responses","repo":"zhziszz/weak-to-strong-search","repo_kind":"official","path":"src/inference_time_alignment/decoders/cbs.py","file_url":"https://github.com/zhziszz/weak-to-strong-search/blob/HEAD/src/inference_time_alignment/decoders/cbs.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a2f3046c86afc453"}},{"code_sha256_prefix":"705ef6f1d1560b7a","entry":"get_truncated_responses","repo":"zhziszz/weak-to-strong-search","repo_kind":"official","path":"src/inference_time_alignment/decoders/cbs.py","file_url":"https://github.com/zhziszz/weak-to-strong-search/blob/HEAD/src/inference_time_alignment/decoders/cbs.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"705ef6f1d1560b7a"}},{"code_sha256_prefix":"f1ced7b7e067c825","entry":"BaseScorer","repo":"zhziszz/weak-to-strong-search","repo_kind":"official","path":"src/inference_time_alignment/decoders/cbs.py","file_url":"https://github.com/zhziszz/weak-to-strong-search/blob/HEAD/src/inference_time_alignment/decoders/cbs.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":"f1ced7b7e067c825"}},{"code_sha256_prefix":"a1f9b039ffbb6ee1","entry":"CBSPosthocGenerationMixin","repo":"zhziszz/weak-to-strong-search","repo_kind":"official","path":"src/inference_time_alignment/decoders/cbs.py","file_url":"https://github.com/zhziszz/weak-to-strong-search/blob/HEAD/src/inference_time_alignment/decoders/cbs.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":"a1f9b039ffbb6ee1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}