The story’s score and claims

Comments on No. 9 of 132 · hiroshi.dev · edition of Saturday 5 December 2026

Verbatim extraction with byte-level constrained decoding

Summary

Hiroshi's post tests seven small models on extracting contract clauses from CUAD. Unconstrained, 4–38% of returned spans are not in the source. Constraining output to the document's token IDs often yields empty answers, since it blocks tokens the model prefers. A byte-level constraint (llguidance's substring_chunks in vLLM) plus allowances for formatting habits cut hallucinated spans to zero and raised span F1 for all seven, for example Qwen3.5-2B from 32.6 to 47.3. Best F1 stays near 50, which the author attributes to choosing passages.

Comments

Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules