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

Add o3-mini support #2685

Open
HelloJocelynLu opened this issue Feb 11, 2025 · 1 comment · May be fixed by #2697
Open

Add o3-mini support #2685

HelloJocelynLu opened this issue Feb 11, 2025 · 1 comment · May be fixed by #2697

Comments

@HelloJocelynLu
Copy link

Hi developers,

I've encountered an issue while trying to run o3-mini on a benchmark using lm-evaluation-harness. The error states: "Unsupported parameter: 'temperature' is not supported with this model."

The problem occurs because the OpenAIChatCompletion API automatically includes the 'temperature' parameter, which isn't compatible with o3-mini. This can be seen in the code here:

temperature = gen_kwargs.pop("temperature", 0)
stop = handle_stop_sequences(gen_kwargs.pop("until", ["<|endoftext|>"]), eos)
if not isinstance(stop, (list, tuple)):
stop = [stop]
output = {
"messages": messages,
"model": self.model,
"max_completion_tokens": max_tokens,
"temperature": temperature,
"stop": stop[:4],
"seed": seed,
**gen_kwargs,
}
if "o1" in self.model:
output.pop("stop")
output["temperature"] = 1
return output

To reproduce the issue:

lm_eval --model openai-chat-completions --model_args model=o3-mini --tasks mmlu_flan_cot_zeroshot_college_chemistry --limit 2 --output output/openai-4o --apply_chat_template --log_samples # fails
lm_eval --model openai-chat-completions --model_args model=o1-preview --tasks mmlu_flan_cot_zeroshot_college_chemistry --limit 2 --output output/openai-4o --apply_chat_template --log_samples # works

Maybe we need something like:

if "o3" in self.model: 
     output.pop("temperature") 

Other discussion: ai-christianson/RA.Aid#70

@baberabb
Copy link
Contributor

Hi! Would you be interested in submitting a PR? we can modify the condition here to include all the o models

@HelloJocelynLu HelloJocelynLu linked a pull request Feb 14, 2025 that will close this issue
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 a pull request may close this issue.

2 participants