Constrained Sampling for Language Models Should Be Easy: An MCMC Perspective
An MCMC perspective on constrained sampling for language models.
Emmanuel Anaya Gonzalez
An MCMC perspective on constrained sampling for language models.
Flexible and efficient grammar-constrained decoding.
Some existing works constrain possible next tokens to ensure grammaticality of generated output. But validity alone is not enough: a decoding algorithm should also preserve the …