Fix name device is not found bug (#12703)

This commit is contained in:
Yuwen Hu 2025-01-13 10:11:02 +08:00 committed by GitHub
parent e2d58f733e
commit a1da7908b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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:
...