Baidu NMT  borrows the Word Reward method from pre-neural MT, which gives a reward r to every word generated, where r is a hyperparameter tuned on the dev set: 3 Murray and Chiang (2018) attribute the fact that beam search prefers shorter candidates to the label bias problem (Lafferty et al., 2001) due to NMT's local normalization.
by default, OpenNMT-py (Klein et al., 2017) stops when the topmost beam candidate stops, because there will not be any future candidates with higher model scores.