docstr: Test the `get_keys_to_not_convert` function with `trust_remote_code` models.
docstr_tok: ["Test","the","`","get_keys_to_not_convert","`","function","with","`","trust_remote_code","`","models","."]
code: def test_get_keys_to_not_convert_trust_remote_code(self):
      r"""
      Test the `get_keys_to_not_convert` function with `trust_remote_code` models.
      """
      from accelerate import init_empty_weights
  
      from transformers.integrations.bitsandbytes import (
          get_keys_to_not_convert,
      )
  
      model_id = "mosaicml/mpt-7b"
      config = AutoConfig.from_pretrained(
          model_id,
          trust_remote_code=True,
          revision="ada218f9a93b5f1c6dce48a4cc9ff01fcba431e7",
      )
      with init_empty_weights():
          model = AutoModelForCausalLM.from_config(
              config,
              trust_remote_code=True,
              code_revision="ada218f9a93b5f1c6dce48a4cc9ff01fcba431e7",
          )
      self.assertEqual(
          get_keys_to_not_convert(model), ["transformer.wte"]
      )
  
imports: import gc
  import importlib.metadata
  import tempfile
  import unittest
  from packaging import version
  from transformers import AutoConfig, AutoModel, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoModelForSequenceClassification, AutoTokenizer, BitsAndBytesConfig, pipeline
  from transformers.testing_utils import is_accelerate_available, 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_get_keys_to_not_convert_trust_remote_code() without return types