Skip to content

Commit

Permalink
fix openai model issues
Browse files Browse the repository at this point in the history
Signed-off-by: SumanthRH <[email protected]>
  • Loading branch information
SumanthRH committed Feb 7, 2025
1 parent b726e1f commit 87ba4ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions skythought/skythought_evals/inference_and_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def perform_inference_and_check(
results[problem_key]["messages"] = ""
results[problem_key]["responses"] = {}
results[problem_key]["token_usages"] = {}
prompt = conversations[idx][1]["content"]
prompt = conversations[idx][-1]["content"]
results[problem_key]["prompt"] = prompt
results[problem_key]["input_conversation"] = conversations[idx]
temperature_to_scores[temp][problem_key] = [
Expand Down Expand Up @@ -477,7 +477,7 @@ def perform_inference_and_save(
results[problem_key]["messages"] = ""
results[problem_key]["responses"] = {}
results[problem_key]["token_usages"] = {}
prompt = conversations[idx][1]["content"]
prompt = conversations[idx][-1]["content"]
results[problem_key]["prompt"] = prompt

results[problem_key]["responses"][str(temp)] = response_entries
Expand Down
9 changes: 5 additions & 4 deletions skythought/skythought_evals/models/model_configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ system_prompts:
<|begin_of_solution|> \
{final formatted, precise, and clear solution} \
<|end_of_solution|> \
Now, try to solve the following question through the above guidelines."
Now, try to solve the following question through the above guidelines:"

user_templates: null
# Example:
Expand All @@ -32,15 +32,16 @@ models:
# 'name' is by default <model_name> in the huggingface format <org>/<model_name>, but can be customized here
name: o1-mini
system_prompt: null
user_template: "Question: {input}\nAnswer: "
# user template's use positional argument for formatting
user_template: "Question: {}\nAnswer: "

openai/o1-preview:
system_prompt: null
user_template: "Question: {input}\nAnswer: "
user_template: "Question: {}\nAnswer: "

openai/gpt-4o-mini:
system_prompt: null
user_template: "User: {input}\nAssistant: "
user_template: "User: {}\nAssistant: "

Qwen/Qwen2-7B-Instruct:
system_prompt: *qwen_cot_system_prompt
Expand Down

0 comments on commit 87ba4ab

Please sign in to comment.