Skip to content

Commit

Permalink
set torch_dtype to float16 for XPU (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
CSY-ModelCloud authored Dec 16, 2024
1 parent f24603c commit 9426835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gptqmodel/models/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def from_quantized(
**cached_file_kwargs,
)

if torch_dtype is None or torch_dtype == "auto":
if torch_dtype is None or torch_dtype == "auto" or device == DEVICE.XPU:
# TODO FIX ME for `dynamic`, non-quantized modules should be in native type
torch_dtype = torch.float16
# auto_dtype_from_config(config=config, device=device, device_map=device_map)
Expand Down

0 comments on commit 9426835

Please sign in to comment.