ReFT: Representation Finetuning for Language Models

Zhengxuan Wu, Aryaman Arora, Zheng Wang, Atticus Geiger, Dan Jurafsky +2 more
4/4/2024
cs.CLcs.AIcs.LG

Official code: stanfordnlp/pyreft (1,579 stars, Apache-2.0, last commit 2026-03-05).

Abstract

Parameter-efficient finetuning (PEFT) methods seek to adapt large neural models via updates to a small number of weights. However, much prior interpretability work has shown that representations encode rich semantic information, suggesting that editing representations might be a more powerful alternative. We pursue this hypothesis by developing a family of Representation Finetuning (ReFT) methods. ReFT methods operate on a frozen base model and learn task-specific interventions on hidden representations. We define a strong instance of the ReFT family, Low-rank Linear Subspace ReFT (LoReFT), and we identify an ablation of this method that trades some performance for increased efficiency. Both are drop-in replacements for existing PEFTs and learn interventions that are 15x--65x more parameter-efficient than LoRA. We showcase LoReFT on eight commonsense reasoning tasks, four arithmetic reasoning tasks, instruction-tuning, and GLUE. In all these evaluations, our ReFTs deliver the best balance of efficiency and performance, and almost always outperform state-of-the-art PEFTs. We release a generic ReFT training library publicly at https://github.com/stanfordnlp/pyreft.

View on arXivView PDF

Code Implementations(1)

stanfordnlp/pyreftOfficial100%
Apache-2.0

Stanford NLP Python library for Representation Finetuning (ReFT)

1,579134Python, Jupyter NotebookFeb 17, 20247 months agoApache-2.0
interpretabilityreftrepresentation-finetuning

Similar Papers

Cite this paper

@article{wu2024reft,
  title  = {ReFT: Representation Finetuning for Language Models},
  author = {Zhengxuan Wu and Aryaman Arora and Zheng Wang and Atticus Geiger and Dan Jurafsky and Christopher D. Manning and Christopher Potts},
  year   = {2024},
  eprint = {2404.03592},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2404.03592},
  url    = {http://arxiv.org/abs/2404.03592v3},
  journal = {NEURIPS 2024 2024}
}

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

Discussion