code: def run_model(
      repo_id,
      test_api,
      in_out_pairs,
      local_model_hub=None,
      warm_up=1,
      num_trials=3,
      num_beams=1,
      low_bit="sym_int4",
      cpu_embedding=False,
  ):
      # TODO: make a parameter
      result = {}
      if test_api == "transformer_int4":
          result = run_transformer_int4(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
              low_bit,
          )
      elif test_api == "native_int4":
          run_native_int4(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
          )
      elif test_api == "optimize_model":
          result = run_optimize_model(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
              low_bit,
          )
      elif test_api == "transformer_int4_gpu":
          result = run_transformer_int4_gpu(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
              low_bit,
          )
      elif test_api == "optimize_model_gpu":
          result = run_optimize_model_gpu(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
              low_bit,
          )
      elif test_api == "pytorch_autocast_bf16":
          result = run_pytorch_autocast_bf16(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
          )
      elif test_api == "ipex_fp16_gpu":
          result = run_ipex_fp16_gpu(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
          )
      elif test_api == "bigdl_fp16_gpu":
          result = result = run_bigdl_fp16_gpu(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
          )
      elif test_api == "deepspeed_transformer_int4_cpu":
          result = run_deepspeed_transformer_int4_cpu(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
              low_bit,
          )
      elif test_api == "transformer_int4_gpu_win":
          result = run_transformer_int4_gpu_win(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
              low_bit,
              cpu_embedding,
          )
      elif test_api == "transformer_autocast_bf16":
          result = run_transformer_autocast_bf16(
              repo_id,
              local_model_hub,
              in_out_pairs,
              warm_up,
              num_trials,
              num_beams,
          )
  
      for in_out_pair in in_out_pairs:
          if result and result[in_out_pair]:
              results.append(
                  [
                      repo_id,
                      round(
                          np.mean(result[in_out_pair], axis=0)[0]
                          * 1000.0,
                          2,
                      ),
                      round(
                          np.mean(result[in_out_pair], axis=0)[1]
                          * 1000.0,
                          2,
                      ),
                      round(
                          np.mean(result[in_out_pair], axis=0)[2]
                          * 1000.0,
                          2,
                      ),
                      in_out_pair,
                      f"{int(np.mean(result[in_out_pair], axis=0)[3])}"
                      + f"-{int(np.mean(result[in_out_pair], axis=0)[4])}",
                      num_beams,
                      low_bit,
                      cpu_embedding if "win" in test_api else "N/A",
                      result[in_out_pair][-1][5]
                      if "int4_gpu" in test_api
                      else "N/A",
                  ]
              )
  
imports: import torch
  import time
  import gc
  import traceback
  import threading
  import numpy
  from datetime import date
  import os
  import sys
  from benchmark_util import BenchmarkWrapper
  from bigdl.llm.utils.common.log4Error import invalidInputError
label_desc: Use image node_id 2 for calling a global function with example usage: run_model(repo_id, test_api, in_out_pairs, local_model_hub, warm_up, num_trials, num_beams, low_bit, cpu_embedding) without return types