Abstract
Large Language Models (LLMs) often struggle with diversity in reasoning tasks, frequently converging on similar incorrect paths during multi-sample inference. We present FIRE (Flaming-hot Initiation with Regular Execution), a simple yet effective sampling strategy that applies an extremely high temperature to only the first token of a response. This "hot start" encourages the model to explore diverse reasoning trajectories without sacrificing logical coherence. Our results demonstrate significant performance gains across math and coding benchmarks, as well as improved outcomes when integrated into reinforcement learning workflows.
Introduction
When solving complex reasoning problems in mathematics or programming, the primary challenge for LLMs is often not a lack of knowledge, but a lack of exploratory diversity. Standard sampling techniques, such as nucleus or top-p sampling, often lead the model into "local minima" where multiple generated attempts follow nearly identical, flawed logic. In "Best-of-N" (BoN) scenarios, where a correct solution is selected from $N$ candidates, the bottleneck is the model's inability to "think" about the problem from different angles.
FIRE sampling addresses this by leveraging the "attention sink" property of transformer models. By introducing high-entropy noise at the very beginning of the sequence, FIRE forces the model to pivot its entire reasoning path, leading to a wider variety of potential solutions.
The FIRE Sampling Strategy
The FIRE method consists of two distinct phases:
- The Flaming-hot Initiation: The first token of the response is sampled at an extremely high temperature (e.g., $T=30$). To maintain a baseline of plausibility, this is combined with top-$k$ filtering, ensuring the model chooses from the most likely starting tokens but with nearly uniform probability among them.
- Regular Execution: For all subsequent tokens, the model reverts to standard low-temperature sampling (typically $T \in [0, 1]$).
This approach is grounded in the observation that initial tokens—often semantically "empty" fillers like "Sure" or "To"—act as anchors for the model's attention. Changing a single initial token can fundamentally alter the internal state and subsequent attention weights, effectively "re-rolling" the model's logic for the entire generation.
Performance and Diversity
A key metric for evaluating FIRE is "Effective Answers" (EA), defined as the number of unique correct solutions found within a set of samples. FIRE consistently outperforms regular sampling in this regard, indicating that it doesn't just find the same correct answer more often, but finds different ways to be correct.
As shown in the figure above, both the Pass@n rate and the number of Effective Answers scale more favorably with FIRE than with regular sampling. This suggests that FIRE is particularly potent for high-budget inference (large $N$), where diversity becomes the limiting factor.
Experimental Results
We evaluated FIRE across several challenging benchmarks, including GSM8K (grade school math), MATH (competition-level math), and MBPP+ (Python programming). The strategy was tested on state-of-the-art open-source models such as Qwen2, DeepSeek-Coder-v2, and Gemma-2.
The table above highlights the consistent improvements provided by FIRE. For instance, on the MATH dataset, Qwen2-7B's pass rate improved from 76.60% to 79.08%. Similar gains were observed in coding tasks; for the MBPP+ benchmark, FIRE increased the pass@10 for Qwen2-7B from 74.2% to 77.0%.
Synergy with Reinforcement Learning
Beyond inference, FIRE proves highly effective during training. When used as the sampling strategy during Proximal Policy Optimization (PPO), FIRE helps the model discover successful reasoning trajectories for difficult problems that it might never have encountered using greedy or standard sampling. This leads to a more robust "base" model with higher single-shot (pass@1) accuracy. For example, a Gemma-2 model trained with FIRE saw its GSM8K pass@1 accuracy increase from 58.07% to 61.20%.
Conclusion
FIRE sampling is a deceptively simple modification to the inference pipeline that yields substantial benefits in reasoning diversity and performance. By targeting the "attention sink" at the start of a generation, it provides a high-leverage intervention that is robust across models and hyperparameters. Future work will explore more complex initiation patterns and the application of FIRE to open-ended creative tasks where quality filtering is more subjective.
Summary updated