code: def __init__(
      self,
      num_bits=2,
      device="cuda",
      method="normal",
      block_size=64,
      *args,
      **kwargs,
  ):
      super().__init__(*args, **kwargs)
      self.num_bits = num_bits
      self.device = device
      self.method = method
      self.block_size = block_size
      if self.method == "normal":
          self.norm_lookup_table = self.create_normal_map(
              num_bits=self.num_bits
          )
          self.norm_lookup_table = self.norm_lookup_table.to(device)
      elif self.method == "uniform":
          self.norm_lookup_table = self.create_uniform_map(
              num_bits=self.num_bits
          )
          self.norm_lookup_table = self.norm_lookup_table.to(device)
      else:
          raise NotImplementedError(
              "Other quantization methods not supported yet."
          )
  
file_path: peft/src/peft/utils/loftq_utils.py
imports: import logging
  from typing import Union
  import torch
  from peft.import_utils import is_bnb_4bit_available, is_bnb_available
label_desc: Use image node_id 1 to create a new NFQuantizer object  with example: obj = NFQuantizer(num_bits, device, method, block_size)