rossi913 commited on
Commit
3adf226
1 Parent(s): cf1f83a

Update modeling_codeshell.py

Browse files

call the "quantize_online" method.

Files changed (1) hide show
  1. modeling_codeshell.py +2 -2
modeling_codeshell.py CHANGED
@@ -809,10 +809,10 @@ class CodeShellForCausalLM(CodeShellPreTrainedModel):
809
  def quantize(self, bits: int):
810
  try:
811
  import bitsandbytes
812
- from .quantizer import quantize
813
  except ImportError:
814
  raise ImportError(f"Needs bitsandbytes to run quantize.")
815
- return quantize(self, bits)
816
 
817
  def get_output_embeddings(self):
818
  return self.lm_head
 
809
  def quantize(self, bits: int):
810
  try:
811
  import bitsandbytes
812
+ from .quantizer import quantize_online
813
  except ImportError:
814
  raise ImportError(f"Needs bitsandbytes to run quantize.")
815
+ return quantize_online(self, bits)
816
 
817
  def get_output_embeddings(self):
818
  return self.lm_head