examples/research_projects/bertabs/modeling_bertabs.py/TransformerDecoderState/repeat_beam_size_times
class TransformerDecoderState:    def repeat_beam_size_times(self, beam_size):
        """Repeat beam_size times along batch dimension."""
        self.src = self.src.data.repeat(1, beam_size, 1)