docstr: A simple test to check if the model conversion has been done correctly by checking on the
  memory footprint of the converted model and the class type of the linear layers of the converted models
docstr_tok: ["A","simple","test","to","check","if","the","model","conversion","has","been","done","correctly","by","checking","on","the","memory","footprint","of","the","converted","model","and","the","class","type","of","the","linear","layers","of","the","converted","models"]
code: def test_memory_footprint(self):
      r"""
      A simple test to check if the model conversion has been done correctly by checking on the
      memory footprint of the converted model and the class type of the linear layers of the converted models
      """
      from bitsandbytes.nn import Int8Params
  
      mem_fp16 = self.model_fp16.get_memory_footprint()
      mem_8bit = self.model_8bit.get_memory_footprint()
  
      self.assertAlmostEqual(
          mem_fp16 / mem_8bit, self.EXPECTED_RELATIVE_DIFFERENCE
      )
      self.assertTrue(
          self.model_8bit.transformer.h[
              0
          ].mlp.dense_4h_to_h.weight.__class__
          == Int8Params
      )
  
imports: import gc
  import unittest
  from transformers import AutoModel, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoModelForSequenceClassification, AutoTokenizer, pipeline
  from transformers.testing_utils import is_torch_available, require_accelerate, require_bitsandbytes, require_torch, require_torch_gpu, require_torch_multi_gpu, slow
label_desc: Use image node_id 3 for calling the MixedInt8Test obj's underlying member method code with example usage: obj.test_memory_footprint() without return types