File tree 1 file changed +6
-1
lines changed
tests/llmcompressor/transformers/obcq
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
from transformers import AutoModelForCausalLM
9
9
from transformers .utils .quantization_config import CompressedTensorsConfig
10
10
11
+ from llmcompressor .transformers .utils import is_model_ct_quantized_from_path
11
12
from llmcompressor .transformers .utils .helpers import infer_recipe_from_model_path
12
13
from tests .testing_utils import parse_params , requires_gpu
13
14
@@ -137,10 +138,14 @@ class TestConsecutiveRunsGPU(TestConsecutiveRuns):
137
138
def setUp (self ):
138
139
from transformers import AutoModelForCausalLM
139
140
141
+ self .assertFalse (
142
+ is_model_ct_quantized_from_path (self .model ),
143
+ "The provided model is quantized. Please use a dense model." ,
144
+ )
145
+
140
146
self .model = AutoModelForCausalLM .from_pretrained (
141
147
self .model ,
142
148
device_map = self .device ,
143
- quantization_config = self .quantization_config ,
144
149
)
145
150
146
151
self .output = "./oneshot_output"
You can’t perform that action at this time.
0 commit comments