# Dostrajanie przez interwencje w reprezentacje

EN: **Fine-tuning through representation interventions** · id `reft` · aliases: representation fine-tuning, representation intervention fine-tuning, dostrajanie reprezentacji

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Trenowanie i dostrajanie](https://aiatlasgraph.com/t/training.md) › [Efektywne dostrajanie](https://aiatlasgraph.com/t/peft.md) › Dostrajanie przez interwencje w reprezentacje

## Description

- PL: Zamiast zmieniać wagi, uczy się małych interwencji na ukrytych reprezentacjach wybranych warstw i pozycji zamrożonego modelu.
- EN: Instead of changing weights, it learns small interventions on hidden representations at chosen layers and positions of a frozen model.

## In one sentence

- PL: Sposób dostrajania, który nie rusza samego modelu, tylko uczy się delikatnie poprawiać jego wewnętrzny tok „myślenia” w trakcie odpowiedzi.
- EN: A fine-tuning approach that leaves the model itself alone and learns to gently nudge its internal 'thinking' while it answers.

## Problem it solves

- PL: Nawet oszczędne metody dostrajania zmieniają wagi, choć do nowego zadania często wystarczy lekko przesunąć to, co model już wie.
- EN: Even lean fine-tuning methods change weights, although a new task often needs only a slight shift in what the model already knows.

## What it does

- PL: Jak suflerka w teatrze: aktor zna rolę, a ona w kilku kluczowych momentach podpowiada, w którą stronę poprowadzić scenę.
- EN: Like a prompter in a theatre: the actor knows the part, and she whispers direction at a few key moments.

## Everyday example

- PL: Model dostaje drobną, wymienną poprawkę, dzięki której zawsze odpowiada zgodnie z firmowym formatem raportu.
- EN: A model gets a tiny swappable tweak that makes it always answer in the company's report format.

## This concerns you if you…

- PL: szukasz bardzo oszczędnej w parametrach adaptacji
- PL: interesuje cię związek dostrajania z zaglądaniem do wnętrza modelu
- EN: want adaptation with very few parameters
- EN: are curious how fine-tuning links to looking inside models

## Keywords

ReFT · LoReFT · pyreft · DiReFT · representation intervention · activation steering · distributed alignment search · low-rank subspace

## How it works

- PL: Model bazowy jest zamrożony. Na wybranych warstwach i pozycjach tokenów wstawia się wyuczoną funkcję edytującą wektor ukryty; w LoReFT to edycja w niskowymiarowej podprzestrzeni liniowej (rzut, przesunięcie, powrót). Uczy się tylko parametrów interwencji.
- EN: The base model stays frozen. At chosen layers and token positions a learned function edits the hidden vector; in LoReFT this is an edit within a low-dimensional linear subspace (project, shift, project back). Only the intervention parameters are trained.

## Limits

- PL: Trzeba dobrać warstwy i pozycje interwencji, co dodaje hiperparametry. Metoda jest młodsza od LoRA i ma mniejszy ekosystem; deklarowana przewaga w liczbie parametrów nie zawsze obniża koszt treningu, który zależy też od aktywacji.
- EN: Layers and positions to intervene on must be chosen, adding hyperparameters. The method is younger than LoRA with a smaller ecosystem; its parameter savings don't always cut training cost, which also depends on activations.

## Key terms

- PL: **reprezentacja ukryta**: Wektor liczb opisujący stan modelu w danej warstwie i pozycji.
- PL: **interwencja**: Celowa zmiana reprezentacji podczas działania modelu.
- PL: **podprzestrzeń niskiego rzędu**: Niewielka liczba kierunków, w których dokonuje się zmiany.
- EN: **hidden representation**: A vector describing the model's state at a given layer and position.
- EN: **intervention**: A deliberate change to a representation while the model runs.
- EN: **low-rank subspace**: A small number of directions along which the change is made.

## Know first

- [Algebra liniowa: wektory i macierze (Linear algebra: vectors and matrices)](https://aiatlasgraph.com/t/linearalgebra.md)

## Related topics

Untyped, symmetric "see also" links.

- [LoRA (Low-rank adaptation)](https://aiatlasgraph.com/t/lora.md)

## Sources

- [ReFT: Representation Finetuning for Language Models](<https://arxiv.org/abs/2404.03592>) `wu-2024-reft` · by Zhengxuan Wu, Aryaman Arora, Zheng Wang, Atticus Geiger, Dan Jurafsky, Christopher D. Manning, Christopher Potts

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/reft · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
