# Efektywne dostrajanie

EN: **Parameter-efficient fine-tuning** · id `peft`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Trenowanie i dostrajanie](https://aiatlasgraph.com/t/training.md) › Efektywne dostrajanie

## Description

- PL: Uczenie wybranych parametrów lub małych adapterów.
- EN: Training selected parameters or small adapters.

## In one sentence

- PL: To dostrajanie modelu przez uczenie tylko niewielkiej części jego ustawień lub dodatkowych elementów.
- EN: This adapts a model by training only a small subset of parameters or additional components.

## Problem it solves

- PL: Zmiana wszystkich ustawień dużego modelu wymaga więcej pamięci i zasobów, niż masz do dyspozycji.
- EN: Updating every parameter of a large model requires more memory and resources than you have available.

## What it does

- PL: Większość modelu pozostaje stała, a małe wybrane części uczą się zadania, zmniejszając ilość przechowywanych poprawek i pracy treningowej.
- EN: Most of the model stays fixed while small selected components learn the task, reducing stored updates and training work.

## Everyday example

- PL: Dostosowujesz duży model do krótkich opisów produktów, zapisując niewielki zestaw zmian zamiast pełnej nowej kopii.
- EN: You adapt a large model for brief product descriptions, storing a small update rather than a full new copy.

## This concerns you if you…

- PL: masz ograniczoną pamięć do dostrajania
- PL: potrzebujesz wielu małych wariantów modelu
- EN: have limited memory for adaptation
- EN: need many small model variants

## Keywords

PEFT library · LoRA · QLoRA · bottleneck adapters · prefix tuning · prompt tuning · IA3 · frozen base weights

## How it works

- PL: Większość parametrów pozostaje zamrożona, a gradient aktualizuje wybrane wagi lub dodane moduły. Adaptery, aktualizacje niskiego rzędu i uczone prefiksy ograniczają przechowywany stan optymalizacji, zachowując model bazowy jako wspólny punkt odniesienia.
- EN: Most parameters remain frozen while gradients update selected weights or added modules. Adapters, low-rank updates and learned prefixes reduce stored optimisation state, retaining a shared base model as a reference.

## Limits

- PL: Mniejsza liczba uczonych parametrów nie usuwa kosztu aktywacji i propagacji gradientu. Zakres adaptacji może być zbyt mały; dobór modułów i zgodność z bazowym checkpointem pozostają istotne.
- EN: Fewer trainable parameters do not eliminate activation and gradient-propagation costs. Adaptation capacity can be insufficient; module selection and compatibility with the base checkpoint remain important.

## Key terms

- PL: **zamrożony parametr**: Waga używana w obliczeniach, ale nieaktualizowana podczas danego treningu.
- PL: **moduł adaptacyjny**: Uczony dodatek modyfikujący działanie wspólnego modelu bazowego.
- EN: **frozen parameter**: A weight used in computation but not updated during that training.
- EN: **adaptation module**: A trainable addition modifying a shared base model's behaviour.

## Know first

- [Propagacja wsteczna (backpropagation) (Backpropagation)](https://aiatlasgraph.com/t/backprop.md)
- [Transformery i attention (Transformers and attention)](https://aiatlasgraph.com/t/transformers.md)

## Examples

- PL: PEFT · LoRA · QLoRA

## Subtopics (6 direct, 8 in total)

- [Adaptery (małe warstwy wstawiane do modelu) (Adapter modules)](https://aiatlasgraph.com/t/adapters.md): Small trainable layers are inserted into a frozen model and only they are trained. One base model can serve many tasks with separate, swappable adapters.
- [Dostrajanie przez interwencje w reprezentacje (Fine-tuning through representation interventions)](https://aiatlasgraph.com/t/reft.md): Instead of changing weights, it learns small interventions on hidden representations at chosen layers and positions of a frozen model.
- [Dostrajanie wyłącznie wektorów biasu (Bias-only fine-tuning)](https://aiatlasgraph.com/t/bitfit.md): Fine-tuning a model by updating only its bias terms or a subset of them while leaving all other weights frozen.
- [LoRA (Low-rank adaptation)](https://aiatlasgraph.com/t/lora.md): Fine-tuning with low-rank adapters. Used for language and image models alike.
  - [QLoRA (Quantized low-rank adaptation (QLoRA))](https://aiatlasgraph.com/t/qlora.md): LoRA on top of a base model stored in 4 bits. Cuts the GPU memory needed for fine-tuning.
  - [Warianty LoRA (DoRA, LoRA+, AdaLoRA) (LoRA variants)](https://aiatlasgraph.com/t/loravariants.md): Refinements of basic LoRA: separating weight magnitude and direction, different learning rates for the two adapter matrices, adaptive rank allocation. They aim to close the gap to full fine-tuning.
- [Miękkie prompty (prompt tuning, prefix tuning) (Soft prompts: prompt and prefix tuning)](https://aiatlasgraph.com/t/softprompts.md): The model stays frozen while a small set of continuous vectors is learned. Prompt tuning adds them as virtual input tokens, whereas prefix tuning supplies learned prefixes to successive attention layers.
- [Skalowanie aktywacji wyuczonymi wektorami (Learned-vector activation rescaling)](https://aiatlasgraph.com/t/ia3.md): A PEFT method that multiplies attention keys, values and feed-forward activations by learned vectors.

## Related topics

Untyped, symmetric "see also" links.

- [Budować czy kupić: API, model otwarty czy gotowe narzędzie (Build vs buy for AI capabilities)](https://aiatlasgraph.com/t/buildvsbuy.md)

## Sources

- [Hugging Face · LoRA (PEFT)](<https://huggingface.co/docs/peft/main/en/conceptual_guides/lora>) `peft` · reference: Adaptery LoRA, także zastosowania do modeli obrazu.

---

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