Skip to content

Hotfix: remove DPO hyperparameter validations #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2025
Merged
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
18 changes: 0 additions & 18 deletions src/together/resources/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,24 +183,6 @@ def create_finetune_request(
)
train_on_inputs = "auto"

if dpo_beta is not None and training_method != "dpo":
raise ValueError("dpo_beta is only supported for DPO training")
if dpo_normalize_logratios_by_length and training_method != "dpo":
raise ValueError(
"dpo_normalize_logratios_by_length=True is only supported for DPO training"
)
if rpo_alpha is not None:
if training_method != "dpo":
raise ValueError("rpo_alpha is only supported for DPO training")
if not rpo_alpha >= 0.0:
raise ValueError(f"rpo_alpha should be non-negative (got {rpo_alpha})")

if simpo_gamma is not None:
if training_method != "dpo":
raise ValueError("simpo_gamma is only supported for DPO training")
if not simpo_gamma >= 0.0:
raise ValueError(f"simpo_gamma should be non-negative (got {simpo_gamma})")

lr_scheduler: FinetuneLRScheduler
if lr_scheduler_type == "cosine":
if scheduler_num_cycles <= 0.0:
Expand Down