flashlight / text

Text utilities, including beam search decoding, tokenizing, and more, built for use in Flashlight.
MIT License
64 stars 14 forks source link

Diverse beam search #54

Closed joecummings closed 1 year ago

joecummings commented 1 year ago

Feature Description

Add ability for diverse beam search according to this paper: https://ojs.aaai.org/index.php/AAAI/article/view/12340

Use Case

"DBS produces sequences that are significantly different from each other by incorporating diversity constraints within groups of candidate sequences during decoding; moreover, it achieves this with minimal computational or memory overhead."

Additional Context

Request from TorchText partners.

joecummings commented 1 year ago

@jacobkahn I'm planning on taking a stab at this.

jacobkahn commented 1 year ago

We'll track the PR here.