File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ def from_pretrained(
28
28
quantize_config : BaseQuantizeConfig ,
29
29
** model_init_kwargs ,
30
30
):
31
- """load un-quantized pretrained model to cpu """
31
+ """Load the un-quantized pretrained model"""
32
32
33
- if not torch .cuda .is_available ():
34
- raise EnvironmentError (
35
- "Load pretrained model to do quantization requires CUDA available."
36
- )
33
+ # if not torch.cuda.is_available():
34
+ # raise EnvironmentError(
35
+ # "Load pretrained model to do quantization requires CUDA available."
36
+ # )
37
37
38
38
def skip (* args , ** kwargs ):
39
39
pass
@@ -88,9 +88,7 @@ def skip(*args, **kwargs):
88
88
model .seqlen = model_config [key ]
89
89
break
90
90
else :
91
- print (
92
- "can't get model's sequence length from model config, will set to 2048."
93
- )
91
+ print ("Can't get model's sequence length, setting to 2048." )
94
92
model .seqlen = 2048
95
93
model .eval ()
96
94
You can’t perform that action at this time.
0 commit comments