{"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/2408-03314","title":"Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters","arxiv_id":"2408.03314","date":"2024-08-06","proceeding":null,"authors":["Charlie Snell","Jaehoon Lee","Kelvin Xu","Aviral Kumar"],"abstract":"Enabling LLMs to improve their outputs by using more test-time computation is a critical step towards building generally self-improving agents that can operate on open-ended natural language. In this paper, we study the scaling of inference-time computation in LLMs, with a focus on answering the question: if an LLM is allowed to use a fixed but non-trivial amount of inference-time compute, how much can it improve its performance on a challenging prompt? Answering this question has implications not only on the achievable performance of LLMs, but also on the future of LLM pretraining and how one should tradeoff inference-time and pre-training compute. Despite its importance, little research attempted to understand the scaling behaviors of various test-time inference methods. Moreover, current work largely provides negative results for a number of these strategies. In this work, we analyze two primary mechanisms to scale test-time computation: (1) searching against dense, process-based verifier reward models; and (2) updating the model's distribution over a response adaptively, given the prompt at test time. We find that in both cases, the effectiveness of different approaches to scaling test-time compute critically varies depending on the difficulty of the prompt. This observation motivates applying a \"compute-optimal\" scaling strategy, which acts to most effectively allocate test-time compute adaptively per prompt. Using this compute-optimal strategy, we can improve the efficiency of test-time compute scaling by more than 4x compared to a best-of-N baseline. Additionally, in a FLOPs-matched evaluation, we find that on problems where a smaller base model attains somewhat non-trivial success rates, test-time compute can be used to outperform a 14x larger model.","url_abs":"https://arxiv.org/abs/2408.03314v1","url_pdf":"https://arxiv.org/pdf/2408.03314v1.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":"2408-03314","repo_url":"https://github.com/huggingface/search-and-learn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"2408-03314","repo_url":"https://github.com/zarahall/fairness-prms","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"2408-03314","repo_url":"https://github.com/codelion/optillm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.03314","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.03314"}},"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/codelion/optillm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huggingface/search-and-learn","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zarahall/fairness-prms","reach":{"status":"ok"}}],"summary":{"unverified":9},"by_repo_kind":{"listed":{"samples":9,"ran":0,"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":"e2fa8778aaa14477","entry":"aggregate_scores","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/utils/score.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/utils/score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e2fa8778aaa14477"}},{"code_sha256_prefix":"0f5e24b2cb4f615b","entry":"batched_math_shepherd_inference","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/models/reward_models.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/models/reward_models.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0f5e24b2cb4f615b"}},{"code_sha256_prefix":"fcb58cf3620ba3fa","entry":"build_conv","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/search/utils.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/search/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fcb58cf3620ba3fa"}},{"code_sha256_prefix":"3c4ade317b7b432b","entry":"extract_completion_answers","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/utils/math.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/utils/math.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3c4ade317b7b432b"}},{"code_sha256_prefix":"ed2f4689128f9885","entry":"extract_multi_choice_answer","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/utils/qwen_math_parser.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/utils/qwen_math_parser.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ed2f4689128f9885"}},{"code_sha256_prefix":"07e55a87bf057096","entry":"get_dataset_revisions","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/utils/hub.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/utils/hub.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"07e55a87bf057096"}},{"code_sha256_prefix":"0a2729199ea72cd2","entry":"last","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/search/utils.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/search/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a2729199ea72cd2"}},{"code_sha256_prefix":"e1583186b85bad63","entry":"list_mean","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/search/utils.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/search/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e1583186b85bad63"}},{"code_sha256_prefix":"940f44544351a853","entry":"subsample_completions","repo":"huggingface/search-and-learn","repo_kind":"listed","path":"src/sal/utils/math.py","file_url":"https://github.com/huggingface/search-and-learn/blob/HEAD/src/sal/utils/math.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"940f44544351a853"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}