mirror of
https://github.com/wassname/moral-maps.git
synced 2026-09-23 13:30:23 +08:00
Per-token NLL over the scoring text is free since we already compute full-sequence logits in guided_rollout / guided_rollout_batch (just gather instead of slicing [:, -1]). Higher NLL = model less coherent on this prompt under whatever steering is attached. eval.py logs pmass/ppl/nll aggregate at end of guided eval so the next run shows degradation at a glance instead of buried tqdm noise. analyse() now exposes raw_nll and info.prompt_nll_mean.