ReasonFlux

The ReasonFlux framework is introduced as an efficient way to fine-tune LLMs for complex reasoning, using hierarchical thought processes. Highlights include:
Ask this paper
Thought template library: Rather than having a model learn long CoT solutions from scratch, ReasonFlux provides a library of ~500 reusable “thought templates” – high-level reasoning steps that can be composed to solve problems. These might be generic strategies like “split the problem into cases” or “verify the solution,” applicable across tasks.
Hierarchical planning via RL: The model is trained (with only 8 GPUs for a 32B model) to plan a sequence of these templates to tackle a problem, using hierarchical reinforcement learning. This way, it learns to orchestrate complex reasoning by chaining templates, instead of generating every reasoning step token-by-token.
Inference-time adaptation: A novel inference strategy allows the model to adjust the granularity of its reasoning on the fly, scaling the template sequence based on difficulty. This means the model can dynamically decide to use more detailed templates for hard problems and fewer for easy ones, optimizing both accuracy and speed.
State-of-the-art results: ReasonFlux achieved high scores on math reasoning benchmarks – for example, 91.2% on MATH, outperforming OpenAI’s reference model by 6.7%, and solved 56.7% of problems on the AIME Olympiad, vastly surpassing previous models. This demonstrates that smart fine-tuning with structured reasoning steps can yield big gains even without massive compute.
Abstract
We present that hierarchical LLM reasoning via scaling thought templates can effectively optimize the reasoning search space and outperform the mathematical reasoning capabilities of powerful LLMs like OpenAI o1-preview and DeepSeek V3. We train our ReasonFlux-32B model with only 8 GPUs and introduces three innovations: (i) a structured and generic thought template library, containing around 500 high-level thought templates capable of generalizing to similar or relevant reasoning problems; (ii) performing hierarchical reinforcement learning on a sequence of thought templates instead of long CoTs, optimizing a base LLM to plan out an optimal template trajectory for gradually handling complex problems; (iii) a brand new inference scaling system that enables hierarchical LLM reasoning by adaptively scaling thought templates at inference time. With a template trajectory containing more explainable reasoning structures than DeepSeek-R1 and o3-mini, our ReasonFlux-32B significantly advances math reasoning capabilities to state-of-the-art levels. Notably, on the MATH benchmark, it achieves an accuracy of 91.2% and surpasses o1-preview by 6.7%. On the USA Math Olympiad (AIME) benchmark, ReasonFlux-32B solves an average of 56.7% of problems, surpassing o1-preview and DeepSeek-V3 by 27% and 45%, respectively. Code: https://github.com/Gen-Verse/ReasonFlux