AI engineering glossary · Transformers LLM architecture

What is diverse beam search?

Diverse beam search: A variant of beam search that splits the beam into groups and penalises later groups for choosing tokens already chosen by earlier ones, giving a set of outputs that differ from one another instead of near-copies.

Level: advancedTopic: Transformers LLM architecture

Diverse beam search: an example

Asking for 4 image captions returns four distinct phrasings rather than four small variations of the same sentence.

Related terms

More Transformers LLM architecture terms

Where you learn it

Diverse beam search is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.