层1: diag_generate ruff 修复
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,12 +38,17 @@ for i in (900, 950):
|
||||
out = model.generate(
|
||||
**inputs, max_new_tokens=512, do_sample=False, temperature=None, top_p=None
|
||||
)
|
||||
completion = tok.decode(out[0][inputs["input_ids"].shape[1] :], skip_special_tokens=True)
|
||||
completion = tok.decode(
|
||||
out[0][inputs["input_ids"].shape[1] :], skip_special_tokens=True
|
||||
)
|
||||
print(f"===== 样本 {i} 题目 =====")
|
||||
print(ds[i]["messages"][-1]["content"][120:280], "…")
|
||||
print(f"----- 生成(前 600 字符)-----")
|
||||
print("----- 生成(前 600 字符)-----")
|
||||
print(completion[:600])
|
||||
print()
|
||||
|
||||
print("判读:应为步骤化数学解答(markdown 风格、以 Answer: 行收尾的倾向);"
|
||||
"乱码/复读/空输出 = 不通过。", flush=True)
|
||||
print(
|
||||
"判读:应为步骤化数学解答(markdown 风格、以 Answer: 行收尾的倾向);"
|
||||
"乱码/复读/空输出 = 不通过。",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user