Kl Consistency Test

Write, calibrate, and debug the prefill-vs-decode logprob (KL) consistency tests in sglang -- the two independent conditions a zero requires (every operator batch-invariant, and the two paths computing the same function), which helper separates them, how to pick a threshold once they hold, and how to localize a divergence to a single operator. Use when adding a KL test to a model, picking or defending a kl_div threshold, or investigating a KL number that is too high.

sgl-project 3bf67c2 14.7 KB Updated

File contents

sgl-project/sglang commit 3bf67c240b

Frequently asked questions

npx skillmds@latest add sgl-project/kl-consistency-test