class_docstr: Criteria to stop on the specified multi-token sequence.
class_docstr_tok: ["Criteria","to","stop","on","the","specified","multi-token","sequence","."]
code: def __call__(self, input_ids, scores, **kwargs) -> bool:
      # For efficiency, we compare the last n tokens where n is the number of tokens in the stop_sequence
      lookback_ids_batch = input_ids[
          :, self.initial_decoder_input_length :
      ][:, -self.sequence_id_len :]
  
      lookback_tokens_batch = self.tokenizer.batch_decode(
          lookback_ids_batch
      )
  
      for i, done in enumerate(self.done_tracker):
          if not done:
              self.done_tracker[i] = (
                  self.sequence in lookback_tokens_batch[i]
              )
      return False not in self.done_tracker
  
imports: import math
  import torch
  import torch.nn.functional
  import transformers
  import peft
  from pathlib import Path
  from typing import List, Mapping, NewType, Optional, Tuple, Union
  from tqdm import tqdm
  from transformers import BatchEncoding
  from lm_eval import utils
  from lm_eval.base import BaseLM
label_desc: Use image node_id 2 for calling the MultiTokenEOSCriteria obj's underlying member method code with example usage: obj.__call__(input_ids, scores) and returns: unknown