class_docstr: This class can be used to stop generation whenever the generated number of tokens exceeds `max_new_tokens`. Keep in
  mind for decoder-only type of transformers, this will **not** include the initial prompted tokens. This is very
  close to `MaxLengthCriteria` but ignores the number of initial tokens.
  
  Args:
      start_length (`int`):
          The number of initial tokens.
      max_new_tokens (`int`):
          The maximum number of tokens to generate.
class_docstr_tok: ["This","class","can","be","used","to","stop","generation","whenever","the","generated","number","of","tokens","exceeds","`","max_new_tokens","`",".","Keep","in","mind","for","decoder-only","type","of","transformers",",","this","will","*","*","not","*","*","include","the","initial","prompted","tokens",".","This","is","very","close","to","`","MaxLengthCriteria","`","but","ignores","the","number","of","initial","tokens",".","Args",":","start_length","(","`","int","`",")",":","The","number","of","initial","tokens",".","max_new_tokens","(","`","int","`",")",":","The","maximum","number","of","tokens","to","generate","."]
code: def __call__(
      self,
      input_ids: torch.LongTensor,
      scores: torch.FloatTensor,
      **kwargs,
  ) -> bool:
      return input_ids.shape[-1] >= self.max_length
  
imports: import time
  import warnings
  from abc import ABC
  from copy import deepcopy
  from typing import Optional
  import torch
  from .utils import add_start_docstrings
label_desc: Use image node_id 2 for calling the MaxNewTokensCriteria obj's underlying member method code with example usage: obj.__call__(input_ids, scores) and returns: unknown