kl-consistency-test
Installation
SKILL.md
KL Consistency Tests
What the test is for
kl_test_utils scores the same token twice -- once as a prefill input logprob, once
as a decode output logprob -- and compares. The two paths run different kernels over
different shapes, so agreement is a statement about state, not about answer
quality: it catches a radix-cache prefix that does not reproduce a fresh prefill, a
stale conv/mamba checkpoint, a SWA pool that evicted something it still needed.
gsm8k passing says nothing about this. Accuracy is insensitive to a handful of corrupted tokens; the KL check is not.
Two independent conditions produce a zero
Reaching bit-identity needs both, and they fail for unrelated reasons. Knowing which one a nonzero belongs to is most of the debugging.