Language models often output text that must follow strict rules, like JSON. Many required symbols, such as colons and quotes, are known in advance, but current methods guess them anyway, wasting time.
The researchers let the rules act as a second guesser. Before the model checks guesses, they merge the required symbols with the model's proposals. Required symbols are accepted without computation.
On a standard test, accepted text pieces per step rose from about two to over five. This makes format-following generation faster. The technique works with existing guessers and needs few code changes.
