flashlight / text

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

Add previous hyp index to beam state and pass it in update func closure #42

Closed jacobkahn closed 1 year ago

jacobkahn commented 1 year ago

Add the previous hypothesis index for which a new token hypothesis is made to the seq2seq decoder state, and pass a collection of those indices in the update func closure to better facilitate caching and batching.

Test plan: CI, tests added

Checklist

facebook-github-bot commented 1 year ago

@jacobkahn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@jacobkahn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D43412720

facebook-github-bot commented 1 year ago

@jacobkahn merged this pull request in flashlight/text@a98e4e873ea6b9880a3c7aaa8222839eb98117af.