GramDelta speeds up grammar updates during constrained decoding
In an arXiv preprint, Hantao Hua and colleagues introduce GramDelta, a constrained decoding framework for language models that can incorporate new grammar rules while generating text. It reuses earlier parsing work and produces the same set of allowed next tokens as a full rebuild. Across four model configurations with sustained grammar updates, the authors report a 10.7- to 11.5-fold speedup in median latency for first-seen updates compared with their strongest rebuild baseline. GramDelta also cut the extra time per output token over unconstrained decoding by 53.1% to 81.9% relative to that baseline. The framework supports adding rules during generation.
Why it matters
In code generation, declarations and inferred types can reveal constraints after output has already begun. Reusing earlier parsing work reduces the delay when those constraints change.
Sources
- PrimaryarXiv · Computation and LanguageSource date ·
Written by AIToolMaps from the source above and checked against it sentence by sentence.