return pmass

This commit is contained in:
wassname committed 2026-05-08 16:36:36 +08:00
1 parent 0e4443398b
commit 9abddaeac5
4 files changed
+68 -46

No files matched your search

+6
View File
@@ -154,6 +154,7 @@ def evaluate(
"label": label, # may be None on unlabeled rows
"top1": res.top1,
"margin": res.margin,
"nll_prompt": res.nll_prompt,
})
pbar.update(len(chunk))
@@ -211,6 +212,11 @@ def evaluate(
"elapsed_s": elapsed,
"median_js": median_js,
"max_js": math.log(2),
# Mean prompt NLL across rows (nats/token, teacher-forcing on the
# rendered chat). Free degradation probe; unsteered baseline gives
# the model's "natural" surprise on prompt text.
"mean_nll_prompt": float(np.mean([r["nll_prompt"] for r in per_row]))
if per_row else None,
}
out: dict[str, Any] = {