class_docstr: [`LogitsWarper`] that performs typical decoding. See [Typical Decoding for Natural Language
  Generation](https://arxiv.org/abs/2202.00666) for more information.
  This version allows for a separate value for each sample and runs inplace when possible.
  It doesn't validate inputs.
  
  Args:
      mass (`float`):
          Value of typical_p between 0 and 1 inclusive, defaults to 0.9.
      filter_value (`float`, *optional*, defaults to `-float("Inf")`):
          All filtered values will be set to this float value.
      min_tokens_to_keep (`int`, *optional*, defaults to 1):
          Minimum number of tokens that cannot be filtered.
code: def __init__(
      self,
      mass: List[float],
      dtype: torch.dtype,
      device: torch.device,
      filter_value: float = -math.inf,
      min_tokens_to_keep: int = 1,
  ):
      self.mass = mass
      self.mass_tensor = torch.tensor(
          mass, dtype=dtype, device=device
      ).unsqueeze(1)
  
      # 1 is a special value that disables typical_p warping for this member of the batch
      disabled = [x == 1.0 for x in mass]
  
      if any(disabled):
          self.disabled_mask = torch.tensor(
              disabled, dtype=torch.bool, device=device
          )
      else:
          self.disabled_mask = None
  
      self.filter_value = filter_value
      self.min_tokens_to_keep = min_tokens_to_keep
  
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 1 to create a new HeterogeneousTypicalLogitsWarper object from inherited base classes: LogitsWarper with example: obj = HeterogeneousTypicalLogitsWarper(mass, dtype, device, filter_value, min_tokens_to_keep)