# Preferencje i RL dla LLM

EN: **Preference optimization and RL for LLMs** · id `preferences`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Trenowanie i dostrajanie](https://aiatlasgraph.com/t/training.md) › [Post-training](https://aiatlasgraph.com/t/posttraining.md) › Preferencje i RL dla LLM

## Description

- PL: Dostosowanie zachowania przy użyciu preferencji lub nagród.
- EN: Shaping behaviour with preferences or rewards.

## In one sentence

- PL: To uczenie modelu zachowania na podstawie ocen, które odpowiedzi są bardziej pożądane.
- EN: This trains model behaviour using evaluations of which responses are more desirable.

## Problem it solves

- PL: Kilka odpowiedzi wygląda poprawnie, ale różnią się użytecznością, stylem lub zgodnością z zasadami.
- EN: Several answers appear correct but differ in usefulness, style or compliance with principles.

## What it does

- PL: Porównania odpowiedzi lub nagrody wpływają na trening, wzmacniając preferowane zachowania; jakość oceny decyduje, czego model faktycznie się uczy.
- EN: Response comparisons or rewards guide training towards preferred behaviour; evaluation quality determines what the model actually learns.

## Everyday example

- PL: Porównujesz odpowiedzi na zgłoszenie i wybierasz tę, która jasno wyjaśnia następny krok bez zbędnych obietnic.
- EN: You compare replies to a request and prefer the one explaining the next step clearly without unnecessary promises.

## This concerns you if you…

- PL: masz oceny jakości odpowiedzi
- PL: chcesz wpływać na styl lub zachowanie modelu
- EN: have response-quality evaluations
- EN: want to shape a model's style or behaviour

## Keywords

preference pairs · Bradley-Terry model · reward models · reference policy · KL regularization · DPO · PPO · GRPO · RLAIF · rejection sampling

## How it works

- PL: Porównania odpowiedzi zamienia się w cel parowy lub używa do uczenia modelu nagrody. Następnie aktualizuje się politykę bezpośrednio z par albo przez próbkowanie i optymalizację nagród, zwykle kontrolując odejście od odniesienia.
- EN: Response comparisons become pairwise objectives or train a reward model. Policies are then updated directly from pairs or through sampling and reward optimisation, typically controlling departure from a reference.

## Limits

- PL: Preferencje zależą od oceniających, instrukcji i prezentacji odpowiedzi. Zgodność z rankingiem nie gwarantuje prawdziwości; silna optymalizacja może wykorzystywać błędy nadzoru lub ograniczać różnorodność.
- EN: Preferences depend on raters, instructions and response presentation. Ranking agreement cannot guarantee truthfulness; strong optimisation can exploit supervision errors or reduce diversity.

## Key terms

- PL: **para preferencji**: Dwie odpowiedzi z oznaczeniem, która jest wyżej oceniana.
- PL: **polityka referencyjna**: Punkt odniesienia służący do kontrolowania zmiany zachowania modelu.
- EN: **preference pair**: Two responses with an indication of which is rated higher.
- EN: **reference policy**: A baseline used to control changes in model behaviour.

## Know first

- [Etykietowanie i feedback (Annotation and feedback)](https://aiatlasgraph.com/t/annotation.md)
- [Gradient polityki (REINFORCE) (Policy gradient methods (REINFORCE))](https://aiatlasgraph.com/t/policygradient.md)

## Examples

- PL: DPO · RLHF · reasoning RL

## Subtopics (4 direct, 10 in total)

- [DPO i optymalizacja offline (Direct preference optimization and offline variants)](https://aiatlasgraph.com/t/dpo.md): Training directly on chosen–rejected answer pairs, with no separate reward model. Computationally cheaper than RL.
  - [Iteracyjne DPO na świeżych danych preferencji (Iterative DPO with newly generated preference data)](https://aiatlasgraph.com/t/onlinedpo.md): Repeated rounds of DPO in which the current model generates answer pairs and a human, reward model or judge rates them.
  - [Optymalizacja preferencji bez modelu referencyjnego (Reference-free preference optimization)](https://aiatlasgraph.com/t/refreepo.md): DPO variants that need no frozen copy of the model as a reference point.
- [Modele nagrody (Reward models)](https://aiatlasgraph.com/t/rewardmodels.md): A model trained on human judgements that scores answers. Used for RL, data filtering and evaluation.
- [Optymalizacja preferencji z ocen binarnych (Preference optimization from binary desirability feedback)](https://aiatlasgraph.com/t/kto.md): Aligning a model on single responses labelled desirable or undesirable, using a utility function from prospect theory.
- [RL z nagrodą (Reinforcement learning with rewards)](https://aiatlasgraph.com/t/rlpolicy.md): Iteratively improving the model's policy against a reward while staying close to its starting behaviour. Costlier and sensitive to hyperparameters.
  - [Destylacja posterioru świadoma drzewa dla długich agentów (Tree-aware posterior self-distillation for long-horizon agentic RL)](https://aiatlasgraph.com/t/treeopsd.md): Critic-free tree-aware posterior self-distillation for credit assignment in agentic RL.
  - [GRPO i warianty bez krytyka (GRPO and critic-free policy optimization)](https://aiatlasgraph.com/t/grpo.md): A PPO variant without a separate value model: the model samples a group of answers to the same prompt and estimates advantage relative to rewards within that group. This reduces memory requirements and is used in several newer reasoning-training recipes.
  - [Klasyczny RLHF: SFT → model nagrody → PPO (Classic RLHF pipeline with PPO)](https://aiatlasgraph.com/t/rlhfppo.md): The three-stage RLHF recipe popularised by InstructGPT: supervised fine-tuning on demonstrations, training a reward model from human rankings, then policy optimisation with PPO while constraining divergence from a reference model.
  - [Uczenie agentów na trajektoriach wielosesyjnych (Multi-session agentic reinforcement learning)](https://aiatlasgraph.com/t/mosaicmsarl.md): Critic-free hierarchical advantage optimization for agent trajectories composed of multiple sessions.

## Related topics

Untyped, symmetric "see also" links.

- [Algorytmy RL (Reinforcement learning algorithms)](https://aiatlasgraph.com/t/rlalgorithms.md)
- [Kernele pisane przez LLM (LLM-generated kernels)](https://aiatlasgraph.com/t/llmkernels.md)
- [Trening według zasad (Constitutional AI, RLAIF) (Constitutional AI and RL from AI feedback)](https://aiatlasgraph.com/t/constitutionalai.md)

## Courses

- [Reinforcement Fine-Tuning LLMs With GRPO](<https://www.deeplearning.ai/courses/reinforcement-fine-tuning-llms-grpo>)

## 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.
- [DeepLearning.AI — course catalogue](<https://www.deeplearning.ai/courses>) `dlai` · course catalogue: 42 topic labels with counts, about 130 courses.
- [LLM Course (Maxime Labonne)](<https://github.com/mlabonne/llm-course>) `mlabonne-llm-course` · by Maxime Labonne

---

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