# What is Prefix tuning? Definition and meaning

Prepends trainable vectors to the attention keys and values at each layer while the model stays frozen.

## Definition

**Prefix tuning**: Prepends trainable vectors to the attention keys and values at each layer while the model stays frozen.

In short: Learning continuous prompts at every layer.

## When it is used

Lightweight task adaptation without changing the model weights.

## Learn more

The full guide to **[Prefix tuning](/tools/prefix-tuning)** explains how it works, when to use it and how it compares with the alternatives, with examples. The [glossary](/glossary) lists every term on the site from A to Z.

Previous term: [Prefect](/glossary/prefect) · Next term: [Presidio](/glossary/presidio)
