Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from transformers import AutoModelForCausalLM
from transformers.utils.quantization_config import CompressedTensorsConfig

from llmcompressor.transformers.utils import is_model_ct_quantized_from_path
from llmcompressor.transformers.utils.helpers import infer_recipe_from_model_path
from tests.testing_utils import parse_params, requires_gpu

Expand Down Expand Up @@ -137,10 +138,14 @@ class TestConsecutiveRunsGPU(TestConsecutiveRuns):
def setUp(self):
from transformers import AutoModelForCausalLM

self.assertFalse(
is_model_ct_quantized_from_path(self.model),
"The provided model is quantized. Please use a dense model.",
)

self.model = AutoModelForCausalLM.from_pretrained(
self.model,
device_map=self.device,
quantization_config=self.quantization_config,
)

self.output = "./oneshot_output"
Expand Down