Skip to content

Docs: treat KTO as a stable trainer#6345

Merged
qgallouedec merged 4 commits into
mainfrom
docs-kto-stable-parity
Jul 9, 2026
Merged

Docs: treat KTO as a stable trainer#6345
qgallouedec merged 4 commits into
mainfrom
docs-kto-stable-parity

Conversation

@qgallouedec

@qgallouedec qgallouedec commented Jul 9, 2026

Copy link
Copy Markdown
Member

KTOTrainer was promoted to the stable API (#6175), but the docs and docstrings still treated it as experimental. This aligns KTO's visibility and references with DPOTrainer.

Changes

  • What's New (README.md, docs/source/index.md): add a "KTO is now stable" highlight.
  • Taxonomy (docs/source/index.md): drop the stale 🧪 marker from KTOTrainer and move it next to DPOTrainer.
  • README parity with DPO: add KTOTrainer to the Highlights trainer list, a KTOTrainer code example, and a trl kto CLI example.
  • Stable references: replace all experimental.kto.KTOTrainer / experimental.kto.KTOConfig refs with KTOTrainer / KTOConfig across docs (kto_trainer.md, example_overview.md, paper_index.md, dataset_formats.md) and source docstrings (kto_config.py, kto_trainer.py), including the collator paths (~trainer.kto_trainer.DataCollator...).

No code behavior changes; the trl.experimental.kto deprecation shim is untouched.


Note

Low Risk
Documentation and docstring-only updates; training behavior and the trl.experimental.kto shim are unchanged.

Overview
Documentation and docstrings now present KTO as a stable trainer alongside DPO, matching the API promotion in #6175 (no runtime changes).

What's New in README.md and docs/source/index.md adds a KTO is now stable highlight; the docs taxonomy moves KTOTrainer out of experimental (drops 🧪) and lists it with offline methods next to DPOTrainer. The README gains KTO parity with DPO: Highlights trainer list, a KTOTrainer quick-start, and a trl kto CLI example.

Across docs (kto_trainer.md, dataset_formats.md, example_overview.md, paper_index.md) and source (kto_config.py, kto_trainer.py), references switch from experimental.kto.KTOTrainer / KTOConfig to stable KTOTrainer / KTOConfig, including autodoc targets and collator paths under ~trainer.kto_trainer.*. dataset_formats.md lists KTOTrainer in the main trainer table instead of under experimental.

Reviewed by Cursor Bugbot for commit 4577043. Bugbot is set up for automated code reviews on this repo. Configure here.

@bot-ci-comment

bot-ci-comment Bot commented Jul 9, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@qgallouedec qgallouedec merged commit 2ee37b8 into main Jul 9, 2026
13 checks passed
@qgallouedec qgallouedec deleted the docs-kto-stable-parity branch July 9, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant