SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.08267 · ICML · 2025

A Practical Two-Stage Recipe for Mathematical LLMs: Maximizing Accuracy with SFT and Efficiency with Reinforcement Learning

Yuichi Inoue, Hiroshi Yoshihara, Taiki Yamaguchi

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 0 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
analokmaus/kaggle-aimo2-fast-math-r1 canonical 0 of 6
FunctionStatusWhere it lives
create_prompt Not yet run analokmaus/kaggle-aimo2-fast-math-r1/experiments/train_fast_nemotron_14b.py
pointer only (licence: NONE) · get_code("522a7f189e5ea3b4")
create_prompt Not yet run analokmaus/kaggle-aimo2-fast-math-r1/experiments/train_first_stage.py
pointer only (licence: NONE) · get_code("e14b5e417be024bf")
exact_div Not yet run analokmaus/kaggle-aimo2-fast-math-r1/finetune/openr1_mod/faster_grpo_trainer.py
pointer only (licence: NONE) · get_code("aed7a3866e065bb8")
extract_boxed_text Not yet run analokmaus/kaggle-aimo2-fast-math-r1/finetune/grpo_rewards.py
pointer only (licence: NONE) · get_code("d1630e3f92e89d5d")
extract_contents Not yet run analokmaus/kaggle-aimo2-fast-math-r1/finetune/grpo_rewards.py
pointer only (licence: NONE) · get_code("2f5695b9a0fb82de")
preprocess_dataset Not yet run analokmaus/kaggle-aimo2-fast-math-r1/experiments/train_token_scheduler.py
pointer only (licence: NONE) · get_code("37c8141d07e7590d")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Enhancing the mathematical reasoning of Large Language Models (LLMs) is a pivotal challenge in advancing AI capabilities. While Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) are the dominant training paradigms, a systematic methodology for combining them to maximize both accuracy and efficiency remains largely unexplored. This paper introduces a practical and effective training recipe that strategically integrates extended SFT with RL from online inference (GRPO). We posit that these methods play complementary, not competing, roles: a prolonged SFT phase first pushes the model's accuracy to its limits, after which a GRPO phase dramatically improves token efficiency while preserving this peak performance. Our experiments reveal that extending SFT for as many as 10 epochs is crucial for performance breakthroughs, and that the primary role of GRPO in this framework is to optimize solution length. The efficacy of our recipe is rigorously validated through top-tier performance on challenging benchmarks, including a high rank among over 2, 200 teams in the strictly leak-free AI Mathematical Olympiad (AIMO). This work provides the community with a battle-tested blueprint for developing state-of-the-art mathematical reasoners that are both exceptionally accurate and practically efficient. To ensure full reproducibility and empower future research, we will opensource our entire framework, including all code, model checkpoints, and training configurations at https://github.com/analokmaus/kaggle-aimo2fast-math-r1.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2507.08267")
get_code_for_paper("2507.08267")
have("2507.08267")

Connect an agent — have() is free.