class_docstr: A class containing all functions for auto-regressive text generation
  
  Pass custom parameter values to 'generate' .
docstr: Decode the id to words
  
  Examples:
      >>> llm = AutoModelForCausalLM.from_pretrained("gpt4all-model-q4_0.bin",
                                                     model_family="llama")
      >>> tokens = llm.tokenize("Q: Tell me something about Intel. A:")
      >>> tokens_id = llm.generate(tokens, max_new_tokens=32)
      >>> llm.decode(tokens_id[0])
  
  :param tokens: list of ids that indicates the tokens, mostly generated by generate
  :return: decoded string
docstr_tok: ["Decode","the","id","to","words","Examples",":",">",">",">","llm","=","AutoModelForCausalLM.from_pretrained","(","``","gpt4all-model-q4_0.bin","''",",","model_family=","''","llama","''",")",">",">",">","tokens","=","llm.tokenize","(","``","Q",":","Tell","me","something","about","Intel",".","A",":","''",")",">",">",">","tokens_id","=","llm.generate","(","tokens",",","max_new_tokens=32",")",">",">",">","llm.decode","(","tokens_id","[","0","]",")",":","param","tokens",":","list","of","ids","that","indicates","the","tokens",",","mostly","generated","by","generate",":","return",":","decoded","string"]
code: def decode(self, tokens: List[int]) -> str:
      """
      Decode the id to words
  
      Examples:
          >>> llm = AutoModelForCausalLM.from_pretrained("gpt4all-model-q4_0.bin",
                                                         model_family="llama")
          >>> tokens = llm.tokenize("Q: Tell me something about Intel. A:")
          >>> tokens_id = llm.generate(tokens, max_new_tokens=32)
          >>> llm.decode(tokens_id[0])
  
      :param tokens: list of ids that indicates the tokens, mostly generated by generate
      :return: decoded string
      """
      output = self.detokenize(tokens)
      if isinstance(output, str):
          return output
      else:
          return output.decode()
  
imports: from typing import Optional, Union, Sequence, List
  from bigdl.llm.utils.common import invalidInputError
  import torch
label_desc: Use image node_id 2 for calling the GenerationMixin obj's underlying member method code with example usage: obj.decode(tokens) and returns: output, output