code: def begin_stream(
      self,
      prompt: str,
      stop_conditions: list,
      max_new_tokens: int,
      gen_settings: Settings,
      encode_special_characters=False,
  ):
      assert isinstance(
          prompt, str
      ), "ExLlamaAltGenerator does not support batched generation"
  
      # Tokenize prompt and limit length to allow prompt and (max) new tokens within max sequence length
  
      max_input_tokens = self.model.config.max_seq_len - max_new_tokens
      self.remaining_tokens = max_new_tokens
  
      input_ids = self.cached_tokenize(
          prompt, encode_special_characters
      )
      applied_input_ids = input_ids[:, -max_input_tokens:]
      self.sequence_str = (
          self.tokenizer.decode(applied_input_ids)[0]
          if applied_input_ids.shape[0] < input_ids.shape[0]
          else prompt
      )
  
      # Settings
  
      self.stop_strings = []
      self.stop_tokens = []
      for t in stop_conditions:
          if isinstance(t, int):
              self.stop_tokens += [t]
          elif isinstance(t, str):
              self.stop_strings += [t]
          else:
              raise ValueError("Unsupported type in stop_conditions")
  
      self.held_text = ""
  
      self.max_stop_tokens = 2
      for ss in self.stop_strings:
          self.max_stop_tokens = max(
              self.max_stop_tokens, self.get_num_tokens(ss) + 2
          )
  
      self.settings = gen_settings
  
      # Start generation
  
      self.gen_begin_reuse(applied_input_ids, gen_settings)
  
file_path: exllama/alt_generator.py
imports: import cuda_ext
  from model import ExLlama, ExLlamaCache
  from tokenizer import ExLlamaTokenizer
  from lora import ExLlamaLora
  import torch
  import torch.nn.functional
label_desc: Use image node_id 4 for calling the ExLlamaAltGenerator obj's underlying member method code with example usage: obj.begin_stream(prompt, stop_conditions, max_new_tokens, gen_settings, encode_special_characters) without return types