[misc] Improve benchmark determinism and dataset API coverage (#33255)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user