code: def get_blocks(model):
      if model.__class__.__name__ == "LlamaForCausalLM":
          layers = model.model.layers
      elif isinstance(model, OPTForCausalLM):
          layers = model.model.decoder.layers
      elif isinstance(model, BloomForCausalLM):
          layers = model.transformer.h
      elif "mpt" in str(model.__class__).lower():
          layers = model.transformer.blocks
      elif "falcon" in str(model.__class__).lower():
          layers = model.transformer.h
      elif "bigcode" in str(model.__class__).lower():
          layers = model.transformer.h
      elif "neox" in str(model.__class__).lower():
          layers = model.gpt_neox.layers
      elif "mistral" in str(model.__class__).lower():
          layers = model.model.layers
      elif "yi" in str(model.__class__).lower():
          layers = model.model.layers
      elif "mixtral" in str(model.__class__).lower():
          layers = model.model.layers
      else:
          invalidInputError(
              False, f"Model type {type(model)} isn't supported."
          )
      return layers
  
file_path: BigDL/python/llm/src/bigdl/llm/transformers/awq/awq.py
imports: import gc
  import os
  from tqdm import tqdm
  import torch
  import torch.nn
  from transformers.models.bloom.modeling_bloom import BloomForCausalLM
  from transformers.models.opt.modeling_opt import OPTForCausalLM
  from transformers.models.llama.modeling_llama import LlamaForCausalLM
  from transformers.models.bloom.modeling_bloom import BloomBlock
  from transformers import AwqConfig, AutoConfig
  from bigdl.llm.transformers.awq.linear import WQLinear_GEMM, WQLinear_GEMV
  from huggingface_hub import snapshot_download
  from bigdl.llm.utils.common import invalidInputError
label_desc: Use image node_id 4 for calling a global function with example usage: get_blocks(model) and returns: layers