Skip to content
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

Small fixes to online dpo example #1879

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Changes from all commits
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
4 changes: 1 addition & 3 deletions examples/scripts/online_dpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
--gradient_accumulation_steps 64 \
--total_episodes 30000 \
--model_name_or_path EleutherAI/pythia-14m \
--sft_model_path EleutherAI/pythia-14m \
--reward_model_path EleutherAI/pythia-14m \
--non_eos_penalty \
--stop_token eos \
Expand All @@ -41,7 +40,6 @@
--gradient_accumulation_steps 4 \
--total_episodes 1000000 \
--model_name_or_path cleanrl/EleutherAI_pythia-1b-deduped__sft__tldr \
--sft_model_path cleanrl/EleutherAI_pythia-1b-deduped__sft__tldr \
--reward_model_path cleanrl/EleutherAI_pythia-1b-deduped__reward__tldr \
--save_strategy no \
--non_eos_penalty \
Expand Down Expand Up @@ -96,7 +94,7 @@ def tokenize(element):
if tokenizer.chat_template is None:
tokenizer.chat_template = SIMPLE_QUERY_CHAT_TEMPLATE
reward_model = AutoModelForSequenceClassification.from_pretrained(config.reward_model_path, num_labels=1)
ref_model = AutoModelForCausalLM.from_pretrained(config.sft_model_path)
ref_model = AutoModelForCausalLM.from_pretrained(model_config.model_name_or_path)
model = AutoModelForCausalLM.from_pretrained(model_config.model_name_or_path)

################
Expand Down
Loading