PreFT: Prefill-only finetuning for efficient inference

Andrew Lanpouthakoun, Aryaman Arora, Zhengxuan Wu, Dhruv Pai, Ben Keigwin, Dan Jurafsky, Christopher Potts

TL;DR

Serving personalized Large Language Models (LLMs) to millions of users via custom adapters (like LoRA) severely bottlenecks generation throughput because loading unique weights during token generation is highly memory-bound. This paper introduces PreFT (Prefill-only Finetuning), a paradigm shift where adapters are applied only during the initial prompt processing (prefill) phase and completely discarded during token generation (decode). This simple modification boosts multi-adapter serving throughput by up to 1.9× while maintaining near-parity in downstream task performance.

What Problem Does This Paper Address?

To personalize LLMs efficiently, systems often serve thousands of lightweight, user-specific low-rank adapters on top of a single shared base model. However, LLM inference consists of two fundamentally different workloads:

  1. Prefill: Processing the input prompt all at once (highly parallel and compute-bound).
  2. Decode: Generating tokens autoregressively, one by one (highly sequential and memory-bound).

When a single inference batch contains requests from multiple users, each request requires its own adapter weights. During the decode phase, loading these distinct adapter weights from memory for every single token creates massive memory overhead. This erodes the benefits of batching and tanks serving throughput. The authors argue that instead of optimizing performance relative to parameter count, we should optimize it relative to serving throughput.

Methods

The authors propose PreFT, which restricts adapter interventions strictly to the prompt tokens. Once the prompt is processed and the key-value (KV) cache is populated, the adapter is turned off, and the model reverts entirely to its frozen base weights for generation.

The authors implement and evaluate prefill-only variants for two distinct parameter-efficient finetuning (PEFT) approaches:

  • LoRA (Low-Rank Adaptation): Modifies weight matrices. Its prefill-only variant is denoted as LoRA$^P$.
  • ReFT (Representation Finetuning): Intervenes directly on hidden activations. Its prefill-only variant is denoted as DiReFT$^P$.

Additionally, to make ReFT training more stable and predictable, the authors introduce "ReFT without Regret", which incorporates zero-delta initialization (ensuring the untrained adapter acts as an identity function) and scales the learning rate prefactor by $1/\sqrt{r}$ to enable smooth learning rate transfer across different ranks ($r$).

The entire framework is implemented natively in a fork of the vLLM inference engine and integrated with the trl reinforcement learning library, supporting graph-safe execution and live weight synchronization.

Datasets

The authors evaluated PreFT across a variety of scales (0.5B to 70B parameters) using several standard datasets:

  • Supervised Finetuning (SFT): Trained on Tülu-3 (instruction following) and OpenThoughts (long-form reasoning).
  • Reinforcement Learning from Verifiable Rewards (RLVR): Trained using the GRPO algorithm on GSM8K (grade-school math), MATH (harder mathematics), and MBPP (coding).
  • Downstream Evaluation: Evaluated on IFEval, MMLU, HumanEval, and LongBench-Write (long-form text generation up to 20k tokens).

Key Insights and Ideas

  • Personalization is Cheap at Prefill, Expensive at Decode: Because the prefill phase is compute-bound, the hardware can easily absorb the computational overhead of running multi-user adapters. Bypassing them during the memory-bound decode phase eliminates the throughput bottleneck entirely.
  • The Loss vs. Accuracy Disconnect: During SFT, PreFTs exhibit slightly higher evaluation loss than all-token adapters. Crucially, however, this higher loss does not translate to a statistically significant drop in downstream task accuracy.
  • Rank is "Free" at Decode Time: If a prefill-only adapter suffers from a lack of capacity, engineers can simply increase its rank. Because the adapter is discarded during generation, increasing the rank improves accuracy with virtually zero penalty to generation throughput.
  • The KV Cache as a Behavioral Carrier: For a prefill-only adapter to work, its influence must be sustained through the generation phase via the KV cache. LoRA$^P$ achieves this perfectly because its multiplicative updates fundamentally reshape how prompt tokens are encoded into the KV cache.

Key Results

1. Massive Throughput Gains

When serving 512 distinct adapters on Llama 3.1 70B using tensor parallelism across 4 H100 GPUs, prefill-only ReFT (DiReFT$^P$) achieves 1.9× the throughput of standard all-token multi-LoRA serving, while LoRA$^P$ achieves 1.87×. These scaling advantages hold across smaller model families as well.

Figure 2: PreFTs maintain throughput more effectively than traditional PEFTs as number of adapters increase. Inference throughput (tokens/s) on the Punica microbenchmark when comparing rank-1 LoRA (prefill-only vs. all positions) and rank-8 DiReFT (prefill-only vs. all positions) with varying numbers of adapters.

2. Downstream Performance Parity

Across SFT instruction-following benchmarks, a two-sided Wilcoxon signed-rank test confirmed no statistically significant difference in downstream accuracy between PreFTs and traditional PEFTs ($p = 0.083$). On reinforcement learning tasks like MATH and HumanEval, PreFTs closely match all-token performance.

Throughput vs. Accuracy across tasks

Limitations and Future Work

  • The GSM8K Exception: PreFTs consistently underperform all-token adapters on GSM8K under both SFT and RL. This suggests that certain step-by-step reasoning tasks still heavily rely on token-level adapter interventions during generation.
  • DiReFT$^P$ Length Collapse: While LoRA$^P$ maintains excellent length control during long-form generation, DiReFT$^P$ suffers from a structural failure where its additive updates collapse into an unconditional "write long" bias, causing generations to hit token caps.
  • Architectural Optimization: This work applied the prefill-only constraint to existing adapter architectures unmodified. The authors note that designing novel architectures explicitly optimized to write their effects directly into the KV cache remains an open and promising direction.

Summary updated

BibTeX
@inproceedings{lanpouthakoun2026preft,
  author = {Andrew Lanpouthakoun and Aryaman Arora and Zhengxuan Wu and Dhruv Pai and Ben Keigwin and Dan Jurafsky and Christopher Potts},
  title = {{PreFT: Prefill-only finetuning for efficient inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ZbSJScTRJE},
}
Figure