docstr: Test generation quality for fused models - single batch case
docstr_tok: ["Test","generation","quality","for","fused","models","-","single","batch","case"]
code: def test_generation_fused(self):
      """
      Test generation quality for fused models - single batch case
      """
      quantization_config = AwqConfig(
          bits=4, fuse_max_seq_len=128, do_fuse=True
      )
  
      model = AutoModelForCausalLM.from_pretrained(
          self.model_name,
          quantization_config=quantization_config,
          low_cpu_mem_usage=True,
          revision=self.model_revision,
      ).to(torch_device)
  
      self._check_fused_modules(model)
  
      tokenizer = AutoTokenizer.from_pretrained(
          self.model_name, revision=self.model_revision
      )
  
      inputs = tokenizer(self.prompt, return_tensors="pt").to(
          torch_device
      )
  
      outputs = model.generate(**inputs, max_new_tokens=12)
  
      self.assertEqual(
          tokenizer.decode(outputs[0], skip_special_tokens=True),
          self.EXPECTED_GENERATION,
      )
  
imports: import gc
  import tempfile
  import unittest
  from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, AwqConfig, OPTForCausalLM
  from transformers.testing_utils import require_accelerate, require_auto_awq, require_torch_gpu, require_torch_multi_gpu, slow, torch_device
  from transformers.utils import is_accelerate_available, is_torch_available
label_desc: Use image node_id 5 for calling the AwqFusedTest obj's underlying member method code with example usage: obj.test_generation_fused() without return types