Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/source/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@
title: Asynchronous GRPO
- local: bema_for_reference_model
title: BEMA for Reference Model
- local: bco_trainer
title: BCO
- local: cpo_trainer
title: CPO
- local: gkd_trainer
Expand Down
111 changes: 0 additions & 111 deletions docs/source/bco_trainer.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/dataset_formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ Choosing the right dataset type depends on the task you are working on and the s
| [`RewardTrainer`] | [Preference (implicit prompt recommended)](#preference) |
| [`RLOOTrainer`] | [Prompt-only](#prompt-only) |
| [`SFTTrainer`] | [Language modeling](#language-modeling) or [Prompt-completion](#prompt-completion) |
| [`experimental.bco.BCOTrainer`] | [Unpaired preference](#unpaired-preference) or [Preference (explicit prompt recommended)](#preference) |
| [`experimental.cpo.CPOTrainer`] | [Preference (explicit prompt recommended)](#preference) |
| [`experimental.gkd.GKDTrainer`] | [Prompt-completion](#prompt-completion) |
| [`experimental.nash_md.NashMDTrainer`] | [Prompt-only](#prompt-only) |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dpo_trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Several formulations of the objective have been proposed in the literature. Init
| `"exo_pair"` | The [EXO](https://huggingface.co/papers/2402.00856) authors propose reverse-KL preference optimization. `label_smoothing` must be strictly greater than `0.0`; a recommended value is `1e-3` (see Eq. 16 for the simplified pairwise variant). The full method uses `K>2` SFT completions and approaches PPO as `K` grows. |
| `"nca_pair"` | The [NCA](https://huggingface.co/papers/2402.05369) authors shows that NCA optimizes the absolute likelihood for each response rather than the relative likelihood. |
| `"robust"` | The [Robust DPO](https://huggingface.co/papers/2403.00409) authors propose an unbiased DPO loss under noisy preferences. Use `label_smoothing` in [`DPOConfig`] to model label-flip probability; valid values are in the range `[0.0, 0.5)`. |
| `"bco_pair"` | The [BCO](https://huggingface.co/papers/2404.04656) authors train a binary classifier whose logit serves as a reward so that the classifier maps {prompt, chosen completion} pairs to 1 and {prompt, rejected completion} pairs to 0. For unpaired data, we recommend the dedicated [`experimental.bco.BCOTrainer`]. |
| `"bco_pair"` | The [BCO](https://huggingface.co/papers/2404.04656) authors train a binary classifier whose logit serves as a reward so that the classifier maps {prompt, chosen completion} pairs to 1 and {prompt, rejected completion} pairs to 0. |
| `"sppo_hard"` | The [SPPO](https://huggingface.co/papers/2405.00675) authors claim that SPPO is capable of solving the Nash equilibrium iteratively by pushing the chosen rewards to be as large as 1/2 and the rejected rewards to be as small as -1/2 and can alleviate data sparsity issues. The implementation approximates this algorithm by employing hard label probabilities, assigning 1 to the winner and 0 to the loser. |
| `"aot"` or `loss_type="aot_unpaired"` | The [AOT](https://huggingface.co/papers/2406.05882) authors propose Distributional Preference Alignment via Optimal Transport. `loss_type="aot"` is for paired data; `loss_type="aot_unpaired"` is for unpaired data. Both enforce stochastic dominance via sorted quantiles; larger per-GPU batch sizes help. |
| `"apo_zero"` or `loss_type="apo_down"` | The [APO](https://huggingface.co/papers/2408.06266) method introduces an anchored objective. `apo_zero` boosts winners and downweights losers (useful when the model underperforms the winners). `apo_down` downweights both, with stronger pressure on losers (useful when the model already outperforms winners). |
Expand Down
1 change: 0 additions & 1 deletion docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Below is an overview of TRL trainers, organized by maturity and method type.
#### Offline methods

- [BEMA for Reference Model](bema_for_reference_model)
- [`BCOTrainer`](bco_trainer)
- [`CPOTrainer`](cpo_trainer)
- [`ORPOTrainer`](orpo_trainer)
- [`TPOTrainer`](tpo_trainer)
Expand Down
2 changes: 0 additions & 2 deletions docs/source/paper_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,6 @@ training_args = DPOConfig(
)
```

For the unpaired version, the user should utilize [`experimental.bco.BCOConfig`] and [`experimental.bco.BCOTrainer`].

### Learn Your Reference Model for Real Good Alignment

**📜 Paper**: https://huggingface.co/papers/2404.09656
Expand Down
11 changes: 0 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ Homepage = "https://github.com/huggingface/trl"
trl = "trl.cli:main"

[project.optional-dependencies]
bco = [
"scikit-learn",
"joblib"
]
deepspeed = [
"deepspeed>=0.18.6",
"transformers!=5.1.0", # see transformers#43780
Expand All @@ -69,9 +65,6 @@ quality = [
quantization = [
"bitsandbytes"
]
scikit = [
"scikit-learn"
]
test = [
"pytest-cov",
"pytest-datadir>=1.7.0", # lazy datadirs
Expand Down Expand Up @@ -101,9 +94,6 @@ harbor = [
"harbor>=0.13.0; python_version >= '3.12'", # harbor requires Python 3.12+ (pulls its sandbox backends)
]
dev = [
# bco
"scikit-learn",
"joblib",
# deepspeed
"deepspeed>=0.18.6",
# kernels: transformers renamed the "hub-kernels" extra to "kernels" in 5.1.0
Expand All @@ -120,7 +110,6 @@ dev = [
"hf-doc-builder",
# quantization
"bitsandbytes",
# scikit: included in bco
# test
"pytest-cov",
"pytest-datadir>=1.7.0", # lazy datadirs
Expand Down
Loading
Loading