This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sampling strategies to beam search (#4768)
* add node and beam samplers * refactor * get stochastic beam search working * Add MultiomialSampler, TopPSampler, TopKSampler to beam_search.py, and tests for those samplers and stochastic_beam_search * Update changelog and finalize documentation * set default to without replacement * Updated TopPSampler to remove loop, with testing and bugfix. Cleaned up documentation and sampeler code. * added p sampler test * Better error messages * Update allennlp/nn/beam_search.py * lint * default to top-k if insufficient examples when top-p sampling * formatting * minor clean up * fix CHANGELOG Co-authored-by: Jackson Stokes <[email protected]>
- Loading branch information