[misc] Improve benchmark determinism and dataset API coverage (#33255)

This commit is contained in:
Liangsheng Yin
2026-08-02 01:39:50 -07:00
committed by GitHub
parent 06554515f4
commit 558c9bdcc2
6 changed files with 199 additions and 10 deletions
+9 -1
View File
@@ -89,7 +89,7 @@ def main(args):
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True,
**args.chat_template_kwargs,
)
questions.append(raw_question)
labels.append(get_answer_value(lines[i]["answer"]))
@@ -184,6 +184,14 @@ if __name__ == "__main__":
action="store_true",
help="Enable thinking mode by wrapping prompts with chat template",
)
parser.add_argument(
"--chat-template-kwargs",
type=json.loads,
default='{"enable_thinking": true}',
help="JSON dict passed through to tokenizer.apply_chat_template. "
"The thinking-toggle kwarg name is model-specific, e.g. "
"'{\"enable_thinking\": true}' (Qwen) or '{\"thinking\": true}' (Kimi).",
)
parser.add_argument(
"--tokenizer-path",
type=str,