mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-23 16:02:10 +00:00
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 dtype is None:
|
||||||
if quantize in ["awq", "exl2", "gptq", "marlin"]:
|
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
|
dtype = torch.bfloat16
|
||||||
else:
|
else:
|
||||||
# These quantizers only work with float16 params.
|
# These quantizers only work with float16 params.
|
||||||
|
Loading…
Reference in New Issue
Block a user