Skip to content

Commit cb24b62

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 727bc14 commit cb24b62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neural_compressor/transformers/models/modeling_auto.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs):
226226

227227
# add quantization_config and save_low_bit to pretrained model dynamically
228228
model.device_map = device_map
229-
229+
230230
# StaticCache's device is initialized by `hf_device_map` in `from_pretrained` method.
231231
if hasattr(model, "hf_device_map"):
232232
device_map = torch.device(device_map) if isinstance(device_map, str) else device_map
233-
model.hf_device_map = {"" : device_map}
233+
model.hf_device_map = {"": device_map}
234234
model.quantization_config = quantization_config
235235

236236
model.save_pretrained = types.MethodType(save_low_bit, model)

0 commit comments

Comments
 (0)