i\'m reading a Character-based Language Model with AllenNLP, it contains a function generate,
def generate(self) -> Tuple[List[Token], torch.tensor]: