code: def main():
      parser = argparse.ArgumentParser(
          description="INT4 pipeline example"
      )
      parser.add_argument(
          "--thread-num",
          type=int,
          default=2,
          required=True,
          help="Number of threads to use for inference",
      )
      parser.add_argument(
          "--model-family",
          type=str,
          default="llama",
          required=True,
          choices=[
              "llama",
              "llama2",
              "bloom",
              "gptneox",
              "starcoder",
              "chatglm",
          ],
          help="The model family of the large language model (supported option: 'llama', 'llama2', "
          "'gptneox', 'bloom', 'starcoder', 'chatglm')",
      )
      parser.add_argument(
          "--repo-id-or-model-path",
          type=str,
          required=True,
          help="The path to the huggingface checkpoint folder",
      )
      parser.add_argument(
          "--prompt",
          type=str,
          default="Once upon a time, there existed a little girl who liked to have adventures. ",
          help="Prompt to infer",
      )
      parser.add_argument(
          "--tmp-path",
          type=str,
          default="/tmp",
          help="path to store intermediate model during the conversion process",
      )
      args = parser.parse_args()
  
      repo_id_or_model_path = args.repo_id_or_model_path
  
      # Currently, we can directly use llama related implementation to run llama2 models
      if args.model_family == "llama2":
          args.model_family = "llama"
  
      # Step 1: convert original model to BigDL llm model
      bigdl_llm_path = convert(
          repo_id_or_model_path=repo_id_or_model_path,
          model_family=args.model_family,
          tmp_path=args.tmp_path,
      )
  
      # Step 2: load int4 model
      llm = load(
          model_path=bigdl_llm_path,
          model_family=args.model_family,
          n_threads=args.thread_num,
      )
  
      # Step 3: inference
      inference(
          llm=llm,
          repo_id_or_model_path=repo_id_or_model_path,
          model_family=args.model_family,
          prompt=args.prompt,
      )
  
imports: import time
  import argparse
  from bigdl.llm.transformers import *
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types