headliner icon indicating copy to clipboard operation
headliner copied to clipboard

does headliner support beam search during decoding?

Open zhangshouleibupt opened this issue 4 years ago • 2 comments

hello,i want to kown does headliner supper beam search way when pridection,if it support, how can i use it,the document dont mention it, and when i check the source code, it seems you use the greedy search during decoding. many thanks.

zhangshouleibupt avatar Oct 21 '20 07:10 zhangshouleibupt

Hi, unfortunately I didnt have time to maintain the master branch of the repo. There is a branch where I implemented beam search: https://github.com/as-ideas/headliner/blob/improve_bert_beam/headliner/model/summarizer_bert.py, you can use summarizer.predict_beam_search() and specify the beam width and it returns the top k paths.

cschaefer26 avatar Oct 23 '20 14:10 cschaefer26

Hi, unfortunately I didnt have time to maintain the master branch of the repo. There is a branch where I implemented beam search: https://github.com/as-ideas/headliner/blob/improve_bert_beam/headliner/model/summarizer_bert.py, you can use summarizer.predict_beam_search() and specify the beam width and it returns the top k paths.

Ok,i will try it .many thanks.by the way, the framwoke is awesome. it really help me a lot.

zhangshouleibupt avatar Oct 27 '20 02:10 zhangshouleibupt