def length_wu(self, beam, logprobs, alpha=0.0):
        """
        NMT length re-ranking score from
        "Google's Neural Machine Translation System" :cite:`wu2016google`.
        """

        modifier = ((5 + len(beam.next_ys)) ** alpha) / ((5 + 1) ** alpha)
        return logprobs / modifier

        NMT length re-ranking score from
        "Google's Neural Machine Translation System" :cite:`wu2016google`.
        
utils_nlp/models/transformers/bertsum/penalties.py