code: def test_load_checkpoint_in_model_dtype(self):
      with tempfile.NamedTemporaryFile(suffix=".pt") as tmpfile:
          model = ModelSeveralDtypes()
          torch.save(model.state_dict(), tmpfile.name)
  
          new_model = ModelSeveralDtypes()
          load_checkpoint_in_model(
              new_model,
              tmpfile.name,
              offload_state_dict=True,
              dtype=torch.float16,
              device_map={"": "cpu"},
          )
  
          self.assertEqual(new_model.int_param.dtype, torch.int64)
          self.assertEqual(new_model.float_param.dtype, torch.float16)
  
imports: import json
  import os
  import tempfile
  import unittest
  from collections import OrderedDict
  import torch
  import torch.nn
  from safetensors.torch import save_file
  from accelerate import init_empty_weights
  from accelerate.test_utils import require_cuda, require_huggingface_suite, require_multi_gpu
  from accelerate.utils.modeling import check_device_map, clean_device_map, compute_module_sizes, convert_file_size_to_int, find_tied_parameters, get_balanced_memory, infer_auto_device_map, load_checkpoint_in_model, load_state_dict, named_module_tensors, retie_parameters, set_module_tensor_to_device
label_desc: Use image node_id 18 for calling the ModelingUtilsTester obj's underlying member method code with example usage: obj.test_load_checkpoint_in_model_dtype() without return types