code: def __init__(
      self,
      bits,
      group_size,
      in_features,
      out_features,
      bias,
      dev,
      backend,
  ):
      super().__init__()
  
      invalidOperationError(
          bits == 4, "Only 4-bit are supported for now."
      )
  
      self.in_features = in_features
      self.out_features = out_features
      self.bits = bits
      self.group_size = group_size if group_size != -1 else in_features
      self.backend = backend
  
      # quick sanity check (make sure aligment)
      invalidInputError(
          self.in_features % self.group_size == 0,
          f"Invalid in_features number {self.in_features}.",
      )
      invalidInputError(
          out_features % (32 // self.bits) == 0,
          f"Invalid out_features number {out_features}.",
      )
      if backend == AwqBackendPackingMethod.LLMAWQ:
          self.wf = (
              torch.tensor([0, 1, 2, 3, 4, 5, 6, 7], dtype=torch.int32)
              * self.bits
          ).unsqueeze(0)
          self.register_buffer(
              "qweight",
              torch.zeros(
                  (out_features, in_features // (32 // self.bits)),
                  dtype=torch.int32,
                  device=dev,
              ),
          )
          zeros_width = calculate_zeros_width(
              in_features, self.group_size
          )
          self.register_buffer(
              "qzeros",
              torch.zeros(
                  (out_features, zeros_width),
                  dtype=torch.int32,
                  device=dev,
              ),
          )
          self.register_buffer(
              "scales",
              torch.zeros(
                  (out_features, zeros_width * (32 // self.bits)),
                  dtype=torch.float16,
                  device=dev,
              ),
          )
      elif backend == AwqBackendPackingMethod.AUTOAWQ:
          self.wf = (
              torch.tensor([0, 4, 1, 5, 2, 6, 3, 7], dtype=torch.int32)
              * self.bits
          ).unsqueeze(0)
          self.register_buffer(
              "qweight",
              torch.zeros(
                  (in_features, out_features // (32 // self.bits)),
                  dtype=torch.int32,
                  device=dev,
              ),
          )
          self.register_buffer(
              "qzeros",
              torch.zeros(
                  (
                      in_features // self.group_size,
                      out_features // (32 // self.bits),
                  ),
                  dtype=torch.int32,
                  device=dev,
              ),
          )
          self.register_buffer(
              "scales",
              torch.zeros(
                  (in_features // self.group_size, out_features),
                  dtype=torch.float16,
                  device=dev,
              ),
          )
      if bias:
          self.register_buffer(
              "bias",
              torch.zeros(
                  (out_features), dtype=torch.float16, device=dev
              ),
          )
      else:
          self.bias = None
  
file_path: BigDL/python/llm/src/bigdl/llm/transformers/awq/linear.py
imports: import torch
  import torch.nn
  from bigdl.llm.utils.common import invalidOperationError, invalidInputError
  from transformers import AwqConfig
  from transformers.utils.quantization_config import AwqBackendPackingMethod
label_desc: Use image node_id 1 to create a new WQLinear_GEMM object from inherited base classes: nn with example: obj = WQLinear_GEMM(bits, group_size, in_features, out_features, bias, dev, backend)