From a1da7908b9c3117538f5649c0a15730f2d44c420 Mon Sep 17 00:00:00 2001 From: Yuwen Hu <54161268+Oscilloscope98@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:11:02 +0800 Subject: [PATCH] Fix name device is not found bug (#12703) --- python/llm/src/ipex_llm/transformers/low_bit_linear.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/llm/src/ipex_llm/transformers/low_bit_linear.py b/python/llm/src/ipex_llm/transformers/low_bit_linear.py index 3aa99e2e..78e10c2c 100644 --- a/python/llm/src/ipex_llm/transformers/low_bit_linear.py +++ b/python/llm/src/ipex_llm/transformers/low_bit_linear.py @@ -395,7 +395,7 @@ class FP4Params(torch.nn.Parameter): return self._shape @overload - def to(self: T, device: Optional[Union[int, device]]=..., + def to(self: T, device: Optional[Union[int, torch.device]]=..., dtype: Optional[Union[dtype, str]]=..., non_blocking: bool=...,) -> T: ...