code: def load_model_chatglm(
      self, model_path: str, from_pretrained_kwargs: dict
  ):
      revision = from_pretrained_kwargs.get("revision", "main")
      print("Customized bigdl-llm loader")
      tokenizer = AutoTokenizer.from_pretrained(
          model_path, trust_remote_code=True, revision=revision
      )
      from bigdl.llm.transformers import AutoModel
  
      model = AutoModel.from_pretrained(
          model_path,
          trust_remote_code=True,
          load_in_4bit=True,
          **from_pretrained_kwargs,
      )
      return model, tokenizer
  
imports: from fastchat.model.model_adapter import register_model_adapter, BaseModelAdapter, ChatGLMAdapter
  from fastchat.modules.gptq import GptqConfig, load_gptq_quantized
  import accelerate
  from fastchat.modules.awq import AWQConfig, load_awq_quantized
  from fastchat.model.model_adapter import get_model_adapter, raise_warning_for_incompatible_cpu_offloading_configuration
  from fastchat.model.monkey_patch_non_inplace import replace_llama_attn_with_non_inplace_operations
  from fastchat.constants import CPU_ISA
  from fastchat.utils import get_gpu_memory
  import torch
  import warnings
  from transformers import AutoTokenizer
  from typing import Dict, List, Optional
  import math
  import psutil
  from bigdl.llm.utils.common import invalidInputError
label_desc: Use image node_id 3 for calling a global function with example usage: load_model_chatglm(model_path, from_pretrained_kwargs) and returns: model,  tokenizer