docstr: Test whether it is possible to mix both `8bit` and `fp32` weights when using `keep_in_fp32_modules` correctly.
code: def test_fp32_8bit_conversion(self):
      r"""
      Test whether it is possible to mix both `8bit` and `fp32` weights when using `keep_in_fp32_modules` correctly.
      """
      from transformers import AutoConfig, AutoModelForCausalLM
  
      bnb_quantization_config = BnbQuantizationConfig(
          load_in_8bit=True, keep_in_fp32_modules=["lm_head"]
      )
  
      with init_empty_weights():
          model = AutoModelForCausalLM.from_config(
              AutoConfig.from_pretrained(self.model_name)
          )
  
      model.tie_weights()
      model = load_and_quantize_model(
          model,
          bnb_quantization_config,
          weights_location=self.weights_location,
          device_map="auto",
          no_split_module_classes=["BloomBlock"],
      )
      self.assertTrue(model.lm_head.weight.dtype == torch.float32)
  
imports: import gc
  import tempfile
  import unittest
  import torch
  import torch.nn
  from accelerate import Accelerator, init_empty_weights
  from accelerate.test_utils import require_bnb, require_cuda, require_huggingface_suite, require_multi_gpu, slow
  from accelerate.utils.bnb import load_and_quantize_model
  from accelerate.utils.dataclasses import BnbQuantizationConfig
label_desc: Use image node_id 8 for calling the MixedInt8EmptyModelTest obj's underlying member method code with example usage: obj.test_fp32_8bit_conversion() without return types