Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix util tests #972

Closed
wants to merge 1 commit into from
Closed
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 @@ -12,6 +12,7 @@
from compressed_tensors.quantization import QuantizationStatus
from compressed_tensors.utils import get_offloaded_device, update_prefix_dict
from transformers import AutoConfig, AutoModelForCausalLM
from transformers.utils.quantization_config import CompressedTensorsConfig

from llmcompressor.core import reset_session
from llmcompressor.pytorch.utils.helpers import tensor_sparsity
Expand Down Expand Up @@ -69,8 +70,11 @@ def test_sparse_model_reload(compressed, config, dtype, tmp_path):
restore_log_level = transformers_logger.getEffectiveLevel()
transformers_logger.setLevel(level=logging.ERROR)

quantization_config = CompressedTensorsConfig(run_compressed=False)
model = AutoModelForCausalLM.from_pretrained(
tmp_path / "oneshot_out", torch_dtype=dtype
tmp_path / "oneshot_out",
torch_dtype=dtype,
quantization_config=quantization_config,
)

# restore transformers logging level now that model shell is loaded
Expand Down
Loading