Guiding Text Generation with Constrained Beam Search in 🤗 Transformers
This blog post assumes that the reader is familiar with text generation methods using the different variants of beam search, as explained in the blog post: “How to generate text: using different decoding methods for language generation with Transformers”
Unlike ordinary beam search, constrained beam search allows us to exert control