The First Few Tokens Are All You Need: An Efficient and Effective Unsupervised Prefix Fine-Tuning Method for Reasoning Models

Ke Ji, Jiahao Xu, Tian Liang, Qiuzhi Liu, Zhiwei He +8 more
3/4/2025
cs.CL

No official code found. Best implementation: 1KE-JI/UPFT (21 stars, last commit 2025-06-13).

Abstract

Improving the reasoning capabilities of large language models (LLMs) typically requires supervised fine-tuning with labeled data or computationally expensive sampling. We introduce Unsupervised Prefix Fine-Tuning (UPFT), which leverages the observation of Prefix Self-Consistency -- the shared initial reasoning steps across diverse solution trajectories -- to enhance LLM reasoning efficiency. By training exclusively on the initial prefix substrings (as few as 8 tokens), UPFT removes the need for labeled data or exhaustive sampling. Experiments on reasoning benchmarks show that UPFT matches the performance of supervised methods such as Rejection Sampling Fine-Tuning, while reducing training time by 75% and sampling cost by 99%. Further analysis reveals that errors tend to appear in later stages of the reasoning process and that prefix-based training preserves the model's structural knowledge. This work demonstrates how minimal unsupervised fine-tuning can unlock substantial reasoning gains in LLMs, offering a scalable and resource-efficient alternative to conventional approaches.

View on arXivView PDF

Code Implementations(1)

1KE-JI/UPFTCommunity61%

Official resources of "The First Few Tokens Are All You Need: An Efficient and Effective Unsupervised Prefix Fine-Tuning Method for Reasoning Models", accepted by NeurIPS 2025

212Shell, PythonMar 22, 20251 years ago

Cite this paper

@article{ji2025first,
  title  = {The First Few Tokens Are All You Need: An Efficient and Effective Unsupervised Prefix Fine-Tuning Method for Reasoning Models},
  author = {Ke Ji and Jiahao Xu and Tian Liang and Qiuzhi Liu and Zhiwei He and Xingyu Chen and Xiaoyuan Liu and Zhijie Wang and Junying Chen and Benyou Wang and Zhaopeng Tu and Haitao Mi and Dong Yu},
  year   = {2025},
  eprint = {2503.02875},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.02875v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.02875.svg)](https://codeofpaper.com/paper/2503.02875)

Discussion