OpenNMT-py icon indicating copy to clipboard operation
OpenNMT-py copied to clipboard

[feature request] add nbest option to top-k / top-p (nucleus sampling) generation

Open vince62s opened this issue 1 year ago • 2 comments

This option would enable to re-rank nbest hypotheses generated with nucleus sampling.

vince62s avatar Feb 13 '23 08:02 vince62s

Hello @vince62s, I would like to know if this feature is already implemented. I am also interested and I could give it a try. Thank you.

PC91 avatar Nov 06 '23 05:11 PC91

It is not implemented yet. I recently revamped beam_search.py and you can check where we use n_best to make sure we add enough hypotheses. You can easily do the same in greed_search.py it is not difficult, if you have issues let me know.

vince62s avatar Nov 06 '23 07:11 vince62s