class_docstr: [`LogitsWarper`] that performs top-k, i.e. restricting to the k highest probability elements.
  This version allows for a separate value for each sample and runs inplace when possible.
  It doesn't validate inputs.
  
  Args:
      top_k (`int`):
          The number of highest probability vocabulary tokens to keep for top-k-filtering.
      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,
      top_k: List[int],
      device: torch.device,
      filter_value: float = -math.inf,
      min_tokens_to_keep: int = 1,
  ):
      self.top_k = top_k
      self.max_top_k = max(top_k)
      # value - 1 as we will use top_k to index and python uses 0 based numbering
      self.top_k_tensor = torch.tensor(
          [max(x - 1, min_tokens_to_keep - 1) for x in top_k],
          dtype=torch.int64,
          device=device,
      ).unsqueeze(1)
  
      # 0 is a special value that disables top_k warping for this member of the batch
      disabled = [x == 0 for x in top_k]
  
      if any(disabled):
          self.top_k_disabled_mask = torch.tensor(
              disabled, dtype=torch.bool, device=device
          ).view(-1, 1)
      else:
          self.top_k_disabled_mask = None
  
      self.filter_value = filter_value
  
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 HeterogeneousTopKLogitsWarper object from inherited base classes: LogitsWarper with example: obj = HeterogeneousTopKLogitsWarper(top_k, device, filter_value, min_tokens_to_keep)