TECHNOLOGY

LoReFT: adapting selected hidden states at selected token positions

In this article
THE QUICK TAKE

LoReFT learns an intervention on representations; layer and token-position choices are essential model state, not optional serving metadata.

Representation Finetuning, abbreviated ReFT here, learns interventions on a frozen language model’s hidden representations. LoReFT is a low-rank subspace-based member of that family. The intervention can be restricted to chosen layers and token positions, making its location in the sequence as important as its learned numerical parameters.

Distinguish representations from new vocabulary

A hidden representation is an intermediate vector produced during model computation. LoReFT modifies selected representations through a learned transformation; it does not simply add text to the user prompt or train a new token embedding. The original authors connect this approach to intervention-based interpretability work, while evaluating it as a practical adaptation method.

Preserve where intervention happens

Record both the target layers and the rule selecting token positions. A template that inserts a system message or changes an instruction separator can move the intended boundary. For an illustrative instruction adaptation, inspect the rendered token sequence and confirm that training and generation target the same semantic positions. Matching tensor dimensions will not catch a misplaced intervention.

Test sequence-format sensitivity

The authors demonstrate that interventions on prompt tokens can influence subsequent generation. That result makes prompt formatting consequential, rather than proving that position rules are automatically robust to every conversation layout. Evaluate short and long instructions, alternative templates and multi-turn inputs when those are part of the intended use. Keep changes in formatting separate from changes in learned intervention rank.

Compare parameters and runtime separately

A small intervention can have few trainable parameters, but the base model still runs. A serving stack must execute the intervention at the correct point; ordinary support for loading LoRA factors does not establish support for this representation-level method. Measure the implemented training and generation path instead of inferring latency from the number of saved tensors.

Export a reproducible intervention

Retain learned state, intervention configuration, position policy, tokenizer and exact base revision. The pyreft library and research scripts provide a concrete implementation context to pin. Compare a fresh reload against fixed pre-save outputs, then evaluate held-out task behavior and retention. LoReFT is useful when selective representation changes produce the intended behavior with a reproducible sequence and runtime contract.

Primary references

ReFT original research.

ReFT author explanation.

Stanford pyreft library.

Related explanations: embeddings and contextual states; the training target.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles