# Destylacja

EN: **Knowledge distillation** · id `distillation`

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

## Description

- PL: Uczenie modelu na sygnale od innego modelu.
- EN: Training a model on signal from another model.

## In one sentence

- PL: To uczenie modelu na odpowiedziach lub sygnałach przygotowanych przez inny model.
- EN: This trains a model using responses or signals produced by another model.

## Problem it solves

- PL: Masz dobry model nauczyciela, ale potrzebujesz innego wariantu do tańszego, mniejszego lub bardziej dopasowanego użycia.
- EN: You have a capable teacher model but need another variant for cheaper, smaller or more tailored use.

## What it does

- PL: Nauczyciel pokazuje odpowiedzi, rozkład możliwych wyborów lub ocenia próby ucznia; uczeń dostosowuje się do tych sygnałów i wymaga własnych testów.
- EN: A teacher provides responses, choice distributions or feedback on student attempts; the student learns from these signals and needs its own tests.

## Everyday example

- PL: Duży model przygotowuje sprawdzone podsumowania, na których uczysz mniejszy wariant do codziennych notatek.
- EN: A large model prepares verified summaries used to train a smaller variant for everyday notes.

## This concerns you if you…

- PL: chcesz przenieść zachowanie do innego modelu
- PL: masz dostęp do odpowiedzi lub ocen nauczyciela
- EN: want to transfer behaviour to another model
- EN: can access a teacher's responses or feedback

## Keywords

knowledge distillation · teacher-student · soft targets · temperature scaling · DistilBERT · MiniLLM · on-policy distillation · synthetic data distillation

## How it works

- PL: Nauczyciel dostarcza rozkłady wyjściowe, reprezentacje lub wygenerowane przykłady, a uczeń dopasowuje do nich własne zachowanie. Cel destylacji można łączyć z nadzorem zadaniowym, wybierając dane i sygnały pasujące do możliwości ucznia.
- EN: Teachers provide output distributions, representations or generated examples, and students match their behaviour. Distillation objectives can combine with task supervision, selecting data and signals suited to student capacity.

## Limits

- PL: Uczeń dziedziczy błędy nauczyciela, a jego pojemność ogranicza odtwarzanie zachowania. Dostępny interfejs determinuje sygnał; poprawa na danych destylacyjnych nie gwarantuje transferu do innych zadań.
- EN: Students inherit teacher errors, with capacity limiting behavioural reproduction. Available interfaces determine signals; improvements on distillation data cannot guarantee transfer to other tasks.

## Key terms

- PL: **nauczyciel**: Model dostarczający sygnał, którego zachowanie odtwarza drugi model.
- PL: **uczeń**: Model uczony na sygnale pochodzącym od nauczyciela.
- EN: **teacher**: A model providing signals for another model to reproduce its behaviour.
- EN: **student**: A model trained using signals supplied by a teacher.

## Know first

- [Uczenie nadzorowane (Supervised learning)](https://aiatlasgraph.com/t/supervised.md)
- [Strategie dekodowania (Decoding strategies)](https://aiatlasgraph.com/t/decoding.md)

## Examples

- PL: Teacher–student · kompresja
- EN: Teacher–student · compression

## Subtopics (6 direct, 8 in total)

- [Destylacja kontekstu (wpisanie instrukcji w wagi modelu) (Context distillation)](https://aiatlasgraph.com/t/contextdistill.md): Fine-tuning a model so that without a long prompt it answers as it did with one.
- [Destylacja na miękkich etykietach (logity nauczyciela) (Soft-label (logit) distillation)](https://aiatlasgraph.com/t/logitdistill.md): The student learns to reproduce the teacher's full probability distribution, not just its top answer. Requires access to the teacher's outputs (logits).
- [Destylacja on-policy (uczeń generuje, nauczyciel ocenia) (On-policy distillation)](https://aiatlasgraph.com/t/onpolicydistill.md): The student generates its own responses and the teacher provides a dense token-level signal for them. This trains the student on states it visits itself rather than only on finished teacher-generated answers.
  - [Destylacja on-policy dla hierarchicznych zespołów agentów (On-policy distillation for hierarchical multi-agent teams)](https://aiatlasgraph.com/t/multiagentopd.md): Combines on-policy distillation with reinforcement learning to train a shared-parameter Leader-Searcher-Answerer team end to end.
  - [Eksploracja w kontekście przez asymetryczną destylację on-policy (In-context exploration through asymmetric on-policy distillation)](https://aiatlasgraph.com/t/asteroid.md): A student-teacher framework in which the student's on-policy history receives action labels from a privileged expert, teaching test-time exploration.
- [Destylacja polityki ze względną przewagą krokową (Step-Advantage Policy Distillation)](https://aiatlasgraph.com/t/sapd.md): An on-policy distillation method over recorded prefixes of multi-turn trajectories, using relative advantages among responses at a single decision step.
- [Destylacja przez odpowiedzi nauczyciela (dane syntetyczne) (Sequence-level distillation from teacher outputs)](https://aiatlasgraph.com/t/seqdistill.md): The teacher generates answers and the student is fine-tuned on them like ordinary data (SFT). Works even with an API-only teacher; licence terms need checking.
- [Rekurencyjna samodestylacja (Recursive self-distillation)](https://aiatlasgraph.com/t/recursiveselfdistill.md): Self-distillation repeated across rounds, with the updated model becoming the teacher for the next iteration.

## Related topics

Untyped, symmetric "see also" links.

- [Destylacja rozumowania do mniejszych modeli (Reasoning distillation)](https://aiatlasgraph.com/t/reasoningdistill.md)
- [Modele językowe na telefonie i laptopie (On-device language models)](https://aiatlasgraph.com/t/ondevicellm.md)

## Sources

- [Stanford CS336 · Language Modeling from Scratch (2025)](<https://cs336.stanford.edu/spring2025/>) `cs336` · reference: Budowa modeli, dane, trening, systemy, inferencja i post-training.
- [Berkeley CS185/285 · Deep Reinforcement Learning (2026)](<https://rail.eecs.berkeley.edu/deeprlcourse/>) `rl` · reference: Uczenie przez wzmacnianie, imitacja, sterowanie i RL dla LLM.

---

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