@@ -132,7 +132,11 @@ def run_codegen(
132132 temperature : float = 0.0 ,
133133 max_new_tokens : int = 1280 ,
134134 greedy : bool = False ,
135+ # openai
135136 reasoning_effort : str = "medium" ,
137+ # anthropic
138+ reasoning_budget : int = 0 ,
139+ reasoning_beta : str = "output-128k-2025-02-19" ,
136140 strip_newlines : bool = False ,
137141 direct_completion : bool = False ,
138142 resume : bool = True ,
@@ -173,6 +177,8 @@ def run_codegen(
173177 temperature = temperature ,
174178 max_new_tokens = max_new_tokens ,
175179 reasoning_effort = reasoning_effort ,
180+ reasoning_budget = reasoning_budget ,
181+ reasoning_beta = reasoning_beta ,
176182 instruction_prefix = instruction_prefix ,
177183 response_prefix = response_prefix ,
178184 prefill = not skip_prefill ,
@@ -186,8 +192,11 @@ def run_codegen(
186192 )
187193
188194 extra = "-" + subset if subset != "full" else ""
189- if reasoning_effort and model .startswith ("o1-" ) or model .startswith ("o3-" ) or model .endswith ("-reasoner" ):
195+ if backend == "openai" and reasoning_effort and model .startswith ("o1-" ) or model .startswith ("o3-" ) or model .endswith ("-reasoner" ):
190196 model = model + f"--{ reasoning_effort } "
197+
198+ if backend == "anthropic" and reasoning_budget and reasoning_beta :
199+ model = model + f"--{ reasoning_budget } -{ reasoning_beta } "
191200
192201 if skip_prefill :
193202 identifier = model .replace ("/" , "--" ) + "--skip_prefill" + f"--{ revision } --bigcodebench{ extra } -{ split } --{ backend } -{ temperature } -{ n_samples } -sanitized_calibrated.jsonl"
0 commit comments