Update modeling_codeshell.py
Browse filescall the "quantize_online" method.
- 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
|
813 |
except ImportError:
|
814 |
raise ImportError(f"Needs bitsandbytes to run quantize.")
|
815 |
-
return
|
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
|