Skip to main content
← Lab

doobspec

confirmedC++ · CPUInference & servingJuly 4, 2026

the question

Constrained decoding masks each token to whatever keeps the output schema-valid. Does that per-step masking bias the distribution, and does a one-step-lookahead correction fix it?

what came out

Exact measurement of the future-validity bias greedy constrained decoding introduces, plus a boundary on whether a depth-1 correction actually buys JSON-Schema validity at CPU scale -- where it earns its cost and where it doesn't.

method & receipts

  • Result: confirmed
  • Machine-readable claims every reported number, in a checkable file.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/doobspec