code: def _save_model(self, path, compression="fp32"):
      if self.use_jit:
          if compression == "bf16":
              # for jit, if we want to compress its precision at saving,
              # we need to save original model's state dict with compression precision
              self.compression = "bf16"
              bf16_sd = transform_state_dict_to_dtype(
                  self.original_state_dict, dtype="bf16"
              )
              torch.save(bf16_sd, path / "ckpt.pth")
          elif compression == "fp32":
              # normal torch.jit.save for fp32 model
              self.compression = "fp32"
              self.model.save(path / "ckpt.pth")
          else:
              invalidInputError(
                  False,
                  "compression does not support {} precision for jit accelerator "
                  "fow now.".format(compression),
              )
      else:
          if compression == "bf16":
              self.compression = "bf16"
              bf16_sd = transform_state_dict_to_dtype(
                  self.original_state_dict, dtype="bf16"
              )
              torch.save(bf16_sd, path / "ckpt.pth")
          else:
              self.compression = "fp32"
              torch.save(self.original_state_dict, path / "ckpt.pth")
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/ipex/ipex_inference_model.py
imports: from bigdl.nano.utils.pytorch import generate_channels_last_available, apply_proper_channels_last, transform_state_dict_to_dtype, patch_attrs_from_model_to_object, jit_convert
  from bigdl.nano.pytorch.model import AcceleratedLightningModule
  from bigdl.nano.pytorch.context_manager import generate_context_manager
  from bigdl.nano.deps.ipex.ipex_api import ipex_optimize
  from bigdl.nano.utils.common import invalidInputError, compare_version
  import operator
  import torch
  import copy
label_desc: Use image node_id 6 for calling the PytorchIPEXJITModel obj's underlying member method code with example usage: obj._save_model(path, compression) without return types