class_docstr: Generates target sentence/ids using a base model.
  
  It generates target sentence/ids for a model (a pretrained transformer model or a function).
class_docstr_tok: ["Generates","target","sentence\/ids","using","a","base","model",".","It","generates","target","sentence\/ids","for","a","model","(","a","pretrained","transformer","model","or","a","function",")","."]
code: def load(cls, in_file, instantiate=True):
      if instantiate:
          return cls._instantiated_load(in_file)
  
      kwargs = super().load(in_file, instantiate=False)
      with Deserializer(
          in_file,
          "shap.models.TextGeneration",
          min_version=0,
          max_version=0,
      ) as s:
          kwargs["tokenizer"] = s.load("tokenizer")
          kwargs["device"] = s.load("device")
      return kwargs
  
file_path: shap/shap/models/_text_generation.py
imports: import numpy
  from .._serializable import Deserializer, Serializer
  from ..utils import safe_isinstance
  from ._model import Model
label_desc: Use image node_id 7 for calling the TextGeneration obj's underlying member method code with example usage: obj.load(cls, in_file, instantiate) and returns: kwargs, cls