torch has xpu support in 2.5
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
This commit is contained in:
parent
3d4c50f028
commit
6becab5d3f
|
@ -413,7 +413,9 @@ def get_model(
|
|||
|
||||
if dtype is None:
|
||||
if quantize in ["awq", "exl2", "gptq", "marlin"]:
|
||||
if SYSTEM == "ipex" and not hasattr(torch, "xpu"):
|
||||
if SYSTEM == "ipex" and not (
|
||||
hasattr(torch, "xpu") and torch.xpu.is_available()
|
||||
):
|
||||
dtype = torch.bfloat16
|
||||
else:
|
||||
# These quantizers only work with float16 params.
|
||||
|
|
Loading…
Reference in New Issue