code: def init_explicit():
      global model, cache, config, generator, tokenizer, lora
  
      # Directory containing model, tokenizer
  
      model_directory = "/mnt/str/models/llama-7b-4bit-128g/"
  
      # Locate files we need within that directory
  
      tokenizer_path = os.path.join(model_directory, "tokenizer.model")
      model_config_path = os.path.join(model_directory, "config.json")
      st_pattern = os.path.join(model_directory, "*.safetensors")
      model_path = glob.glob(st_pattern)[0]
  
      # Create config, model, tokenizer and generator
  
      config = ExLlamaConfig(
          model_config_path
      )  # create config from config.json
      config.model_path = (
          model_path  # supply path to model weights file
      )
  
      model = ExLlama(
          config
      )  # create ExLlama instance and load the weights
      tokenizer = ExLlamaTokenizer(
          tokenizer_path
      )  # create tokenizer from tokenizer model file
  
      cache = ExLlamaCache(model)  # create cache for inference
      generator = ExLlamaAltGenerator(
          model, tokenizer, cache
      )  # create generator
  
      # Load LoRA
  
      lora_dir = None
  
      if lora_dir is not None:
          lora_config = os.path.join(lora_dir, "adapter_config.json")
          lora = os.path.join(lora_dir, "adapter_model.bin")
          lora = ExLlamaLora(model, lora_config, lora)
  
file_path: exllama/example_alt_generator.py
imports: from model import ExLlama, ExLlamaCache, ExLlamaConfig
  from lora import ExLlamaLora
  from tokenizer import ExLlamaTokenizer
  from alt_generator import ExLlamaAltGenerator
  import argparse
  import torch
  import sys
  import os
  import glob
  import model_init
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: init_explicit() without return types