Skip to content

Commit 63e69a6

Browse files
author
Daniel Zautner
committed
Disable reasoning on scorer model by default
Pass enable_thinking=False via extra_body to the scorer model so it doesn't waste tokens on chain-of-thought when grading answers.
1 parent 5385ba1 commit 63e69a6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/lighteval/tasks/multilingual/tasks/mmath500.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import os
2424

2525
from inspect_ai.dataset import Sample
26-
from inspect_ai.model import get_model
26+
from inspect_ai.model import GenerateConfig, get_model
2727
from inspect_ai.scorer import model_graded_fact
2828
from inspect_ai.solver import generate, prompt_template
2929

@@ -54,6 +54,9 @@ def _get_scorer_model():
5454
model_name = os.environ.get("SCORER_MODEL_PATH", "Qwen/Qwen3.5-9B")
5555
return get_model(
5656
f"openai-api/scorer/{model_name}",
57+
config=GenerateConfig(
58+
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
59+
),
5760
base_url=base_url,
5861
api_key=os.environ.get("VLLM_API_KEY", "inspectai"),
5962
)

0 commit comments

Comments
 (0)