class_docstr: [`LogitsProcessor`] enforcing an exponential penalty on repeated sequences.
  This version allows for a separate value for each sample and runs inplace when possible.
  It doesn't validate inputs.
  
  Args:
      repetition_penalty (`List[float]`):
          The parameter for repetition penalty. 1.0 means no penalty. See [this
          paper](https://arxiv.org/pdf/1909.05858.pdf) for more details.
code: def __call__(
      self, input_ids: torch.Tensor, scores: torch.Tensor
  ) -> torch.Tensor:
      score = torch.gather(scores, 1, input_ids)
  
      # if score < 0 then repetition penalty has to be multiplied to reduce the previous token probability
      score = torch.where(
          score < 0,
          score * self.penalty_tensor,
          score / self.penalty_tensor,
      )
  
      scores.scatter_(1, input_ids, score)
      return scores
  
imports: import math
  import torch
  from functools import lru_cache
  from typing import Optional, List, Dict, Union
  from transformers import LogitsWarper, LogitsProcessor, TemperatureLogitsWarper, TopKLogitsWarper, TopPLogitsWarper, TypicalLogitsWarper
label_desc: Use image node_id 2 for calling the HeterogeneousRepetitionPenaltyLogitsProcessor obj's underlying member method code with example usage: obj.__call__(input_ids, scores) and returns: scores