class_docstr: Full testing suite of the `BetterTransformers` integration into Hugging Face
  `transformers` ecosystem. Check the docstring of each test to understand the
  purpose of each test. Basically we test:
  - if the conversion dictionnary is consistent, ie if the converted model exists
  in HuggingFace `transformers` library.
  - if the converted model produces the same logits as the original model.
  - if the converted model is faster than the original model.
class_docstr_tok: ["Full","testing","suite","of","the","`","BetterTransformers","`","integration","into","Hugging","Face","`","transformers","`","ecosystem",".","Check","the","docstring","of","each","test","to","understand","the","purpose","of","each","test",".","Basically","we","test",":","-","if","the","conversion","dictionnary","is","consistent",",","ie","if","the","converted","model","exists","in","HuggingFace","`","transformers","`","library",".","-","if","the","converted","model","produces","the","same","logits","as","the","original","model",".","-","if","the","converted","model","is","faster","than","the","original","model","."]
docstr: Wrapper around the `check_accelerate_compatibility_cpu_gpu` test with `keep_original_model=False`
  & `max_memory = {0: "2GB"}`
docstr_tok: ["Wrapper","around","the","`","check_accelerate_compatibility_cpu_gpu","`","test","with","`","keep_original_model=False","`","&","`","max_memory","=","{","0",":","``","2GB","''","}","`"]
code: def test_accelerate_compatibility_single_gpu(self):
      r"""
      Wrapper around the `check_accelerate_compatibility_cpu_gpu` test with `keep_original_model=False`
      & `max_memory = {0: "2GB"}`
      """
      max_memory = {0: "2GB"}
      self.check_accelerate_compatibility_cpu_gpu(
          keep_original_model=True, max_memory=max_memory
      )
  
imports: import gc
  import timeit
  import pytest
  import torch
  import transformers
  from parameterized import parameterized
  from testing_utils import MODELS_DICT, BetterTransformersTestMixin
  from transformers import AutoModel, AutoProcessor, AutoTokenizer
  from optimum.bettertransformer import BetterTransformer
  from optimum.pipelines import pipeline
  from optimum.utils.testing_utils import grid_parameters, require_accelerate, require_torch_gpu
label_desc: Use image node_id 10 for calling the BetterTransformersEncoderTest obj's underlying member method code with example usage: obj.test_accelerate_compatibility_single_gpu() without return types