class_docstr: Base class for LLM models
  
  This class handles a few of the checks, as well as the whole prediction
  machinery.
  
  Required attributes are:
  
  - model_name
  - model
  - tokenizer
  - prompt
  - probas_sum_to_1
  - device
  - error_low_prob
  - threshold_low_prob
  - use_caching
class_docstr_tok: ["Base","class","for","LLM","models","This","class","handles","a","few","of","the","checks",",","as","well","as","the","whole","prediction","machinery",".","Required","attributes","are",":","-","model_name","-","model","-","tokenizer","-","prompt","-","probas_sum_to_1","-","device","-","error_low_prob","-","threshold_low_prob","-","use_caching"]
code: def check_args(self):
      # users should either pass the model name, or the model and tokenizer,
      # but not both
      cls_name = self.__class__.__name__
      msg = (
          f"{cls_name} needs to be initialized with either a model name, "
          "or a model & tokenizer, but not both."
      )
      if self.model_name is not None:
          if (self.model is not None) or (self.tokenizer is not None):
              raise ValueError(msg)
      else:
          if (self.model is None) or (self.tokenizer is None):
              raise ValueError(msg)
  
      possible_values_error_low_prob = [
          "ignore",
          "raise",
          "warn",
          "return_none",
      ]
      if self.error_low_prob not in possible_values_error_low_prob:
          raise ValueError(
              "error_low_prob must be one of "
              f"{', '.join(possible_values_error_low_prob)}; "
              f"got {self.error_low_prob} instead"
          )
  
      if (self.threshold_low_prob < 0) or (self.threshold_low_prob > 1):
          raise ValueError(
              "threshold_low_prob must be between 0 and 1, "
              f"got {self.threshold_low_prob} instead"
          )
  
imports: import importlib
  import warnings
  from string import Formatter
  import numpy
  import torch
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.utils import check_random_state
  from sklearn.utils.validation import check_is_fitted
  from transformers import AutoConfig, AutoTokenizer, LogitsProcessor
  from skorch.exceptions import LowProbabilityError
  from skorch.llm.prompts import DEFAULT_PROMPT_FEW_SHOT, DEFAULT_PROMPT_ZERO_SHOT, DELIM
label_desc: Use image node_id 8 for calling the _LlmBase obj's underlying member method code with example usage: obj.check_args() without return types