PAFT: Prompt-Agnostic Fine-Tuning

Chenxing Wei, Yao Shu, Mingwen Ou, Ying Tiffany He, Fei Richard Yu
2/18/2025
cs.CLcs.AI

No official code found. Best implementation: kithib/PAFT (7 stars, last commit 2025-02-27).

Abstract

Fine-tuning large language models (LLMs) often causes overfitting to specific prompt wording, where minor phrasing variations drastically reduce performance. To address this, we propose Prompt-Agnostic Fine-Tuning (PAFT), a method that enhances robustness through dynamic prompt variation during training. PAFT first generates diverse synthetic prompts, then continuously samples from this set to construct training instances, forcing models to learn fundamental task principles rather than surface-level patterns. Across systematic evaluations using both supervised fine-tuning (SFT) and reinforcement learning fine-tuning (RLFT), PAFT demonstrates substantially improved prompt robustness, achieving 7% higher generalization accuracy on unseen prompts than standard methods. In addition to enhanced robustness, PAFT consistently yields superior overall performance on established benchmarks for question answering, mathematical reasoning, and tool use. Notably, models trained with PAFT attain 3.2 faster inference speeds due to reduced prompt sensitivity. Ablation studies further validate effectiveness of PAFT, while theoretical analysis reveals that PAFT can effectively enhance the cross-domain generalization ability of LLM.

View on arXivView PDF

Code Implementations(1)

kithib/PAFTCommunity53%

PAFT: Prompt-Agnostic Fine-Tuning

70Shell, PythonFeb 27, 20251 years ago

Similar Papers

Cite this paper

@article{wei2025paft,
  title  = {PAFT: Prompt-Agnostic Fine-Tuning},
  author = {Chenxing Wei and Yao Shu and Mingwen Ou and Ying Tiffany He and Fei Richard Yu},
  year   = {2025},
  eprint = {2502.12859},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.12859v3}
}

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/2502.12859.svg)](https://codeofpaper.com/paper/2502.12859)

Discussion