code: def load(model_path, model_family, n_threads):
      model_family_to_class = {
          "llama": LlamaForCausalLM,
          "gptneox": GptneoxForCausalLM,
          "bloom": BloomForCausalLM,
          "starcoder": StarcoderForCausalLM,
          "chatglm": ChatGLMForCausalLM,
      }
  
      if model_family in model_family_to_class:
          llm_causal = model_family_to_class[model_family]
      else:
          raise ValueError(f"Unknown model family: {model_family}")
  
      llm = llm_causal.from_pretrained(
          pretrained_model_name_or_path=model_path,
          native=True,
          dtype="int4",
          n_threads=n_threads,
      )
  
      return llm
  
imports: import time
  import argparse
  from bigdl.llm.transformers import *
label_desc: Use image node_id 2 for calling a global function with example usage: load(model_path, model_family, n_threads) and returns: llm