code: def test_transformers_auto_model_int4(self):
      model_path = os.environ.get("ORIGINAL_CHATGLM2_6B_PATH")
      model = AutoModel.from_pretrained(
          model_path, trust_remote_code=True, load_in_4bit=True
      )
      tokenizer = AutoTokenizer.from_pretrained(
          model_path, trust_remote_code=True
      )
      input_str = "Tell me the capital of France.\n\n"
  
      with torch.inference_mode():
          st = time.time()
          input_ids = tokenizer.encode(input_str, return_tensors="pt")
          output = model.generate(
              input_ids, do_sample=False, max_new_tokens=32
          )
          output_str = tokenizer.decode(
              output[0], skip_special_tokens=True
          )
          end = time.time()
      print("Prompt:", input_str)
      print("Output:", output_str)
      print(f"Inference time: {end-st} s")
      res = "Paris" in output_str
      self.assertTrue(res)
  
file_path: BigDL/python/llm/test/inference/test_transformers_api.py
imports: import unittest
  import os
  import pytest
  import time
  import torch
  from bigdl.llm.transformers import AutoModel, AutoModelForCausalLM, AutoModelForSpeechSeq2Seq
  from transformers import AutoTokenizer
label_desc: Use image node_id 2 for calling the TestTransformersAPI obj's underlying member method code with example usage: obj.test_transformers_auto_model_int4() without return types