Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Change the default value for XPU weight-only quantization #1194

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs):
quantization_config = WeightOnlyQuantConfig(compute_dtype="fp32", weight_dtype="nf4")
else:
quantization_config = WeightOnlyQuantConfig(compute_dtype=convert_dtype_torch2str(torch_dtype),
weight_dtype="nf4")
weight_dtype="nf4" if use_cpu else "int4_fullrange")
else:
assert ("4" in quantization_config.weight_dtype
and convert_dtype_str2torch(quantization_config.compute_dtype) == torch_dtype
Expand Down
Loading