src/transformers/generation_stopping_criteria.py/MaxNewTokensCriteria/__call__
class MaxNewTokensCriteria:    def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
        return input_ids.shape[-1] >= self.max_length