{"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/reinforcement-learning-for-reasoning-in-small","title":"Reinforcement Learning for Reasoning in Small LLMs: What Works and What Doesn't","arxiv_id":"2503.16219","date":"2025-03-20","proceeding":null,"authors":["Quy-Anh Dang","Chris Ngo"],"abstract":"Enhancing the reasoning capabilities of large language models (LLMs) typically relies on massive computational resources and extensive datasets, limiting accessibility for resource-constrained settings. Our study investigates the potential of reinforcement learning (RL) to improve reasoning in small LLMs, focusing on a 1.5-billion-parameter model, DeepSeek-R1-Distill-Qwen-1.5B, under strict constraints: training on 4 NVIDIA A40 GPUs (48 GB VRAM each) within 24 hours. Adapting the Group Relative Policy Optimization (GRPO) algorithm and curating a compact, high-quality mathematical reasoning dataset, we conducted three experiments to explore model behavior and performance. Our results demonstrate rapid reasoning gains - e.g., AMC23 accuracy rising from 63% to 80% and AIME24 reaching 46.7%, surpassing o1-preview - using only 7,000 samples and a $42 training cost, compared to thousands of dollars for baseline models. However, challenges such as optimization instability and length constraints emerged with prolonged training. These findings highlight the efficacy of RL-based fine-tuning for small LLMs, offering a cost-effective alternative to large-scale approaches. We release our code and datasets as open-source resources, providing insights into trade-offs and laying a foundation for scalable, reasoning-capable LLMs in resource-limited environments. All are available at https://github.com/knoveleng/open-rs.","url_abs":"https://arxiv.org/abs/2503.16219v1","url_pdf":"https://arxiv.org/pdf/2503.16219v1.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":"reinforcement-learning-for-reasoning-in-small","repo_url":"https://github.com/knoveleng/open-rs","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"mathematical-reasoning","task_name":"Mathematical Reasoning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2503.16219","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.16219"}},"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/knoveleng/open-rs","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":5,"ran":2,"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":"9b92c44e1bde6319","entry":"get_callbacks","repo":"knoveleng/open-rs","repo_kind":"official","path":"src/open_r1/utils/callbacks.py","file_url":"https://github.com/knoveleng/open-rs/blob/HEAD/src/open_r1/utils/callbacks.py","link_basis":"harvester_set","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":"9b92c44e1bde6319"}},{"code_sha256_prefix":"dcbd918d943fcaab","entry":"get_param_count_from_repo_id","repo":"knoveleng/open-rs","repo_kind":"official","path":"src/open_r1/utils/hub.py","file_url":"https://github.com/knoveleng/open-rs/blob/HEAD/src/open_r1/utils/hub.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":"dcbd918d943fcaab"}},{"code_sha256_prefix":"0a5c0b6fb53cd48c","entry":"format_reward","repo":"knoveleng/open-rs","repo_kind":"official","path":"src/open_r1/rewards.py","file_url":"https://github.com/knoveleng/open-rs/blob/HEAD/src/open_r1/rewards.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":"0a5c0b6fb53cd48c"}},{"code_sha256_prefix":"4b0eb1a9216422d3","entry":"get_gpu_count_for_vllm","repo":"knoveleng/open-rs","repo_kind":"official","path":"src/open_r1/utils/hub.py","file_url":"https://github.com/knoveleng/open-rs/blob/HEAD/src/open_r1/utils/hub.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":"4b0eb1a9216422d3"}},{"code_sha256_prefix":"0a9f60618bd16d86","entry":"tag_count_reward","repo":"knoveleng/open-rs","repo_kind":"official","path":"src/open_r1/rewards.py","file_url":"https://github.com/knoveleng/open-rs/blob/HEAD/src/open_r1/rewards.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":"0a9f60618bd16d86"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}