[ CI/Build ] Added E2E Test For Compressed Tensors (#5839)
Co-authored-by: Michael Goin <michael@neuralmagic.com> Co-authored-by: Robert Shaw <rshaw@neuralmagic>
This commit is contained in:
co-authored by
Michael Goin
Robert Shaw
parent
f7dac83d95
commit
8dbfcd35bf
@@ -176,6 +176,7 @@ class HfRunner:
|
||||
model_kwargs: Optional[Dict[str, Any]] = None,
|
||||
is_embedding_model: bool = False,
|
||||
is_vision_model: bool = False,
|
||||
is_sparseml_model: bool = False,
|
||||
) -> None:
|
||||
assert dtype in _STR_DTYPE_TO_TORCH_DTYPE
|
||||
torch_dtype = _STR_DTYPE_TO_TORCH_DTYPE[dtype]
|
||||
@@ -193,6 +194,9 @@ class HfRunner:
|
||||
else:
|
||||
if is_vision_model:
|
||||
auto_cls = AutoModelForVision2Seq
|
||||
elif is_sparseml_model:
|
||||
from sparseml.transformers import SparseAutoModelForCausalLM
|
||||
auto_cls = SparseAutoModelForCausalLM
|
||||
else:
|
||||
auto_cls = AutoModelForCausalLM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user