@@ -4454,7 +4454,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
|||||||
# once the weights have been quantized
|
# once the weights have been quantized
|
||||||
# Note that once you have loaded a quantized model, you can't change its dtype so this will
|
# Note that once you have loaded a quantized model, you can't change its dtype so this will
|
||||||
# remain a single source of truth
|
# remain a single source of truth
|
||||||
config._pre_quantization_dtype = torch_dtype
|
config._pre_quantization_dtype = torch_dtype if torch_dtype is not None else torch.get_default_dtype()
|
||||||
|
|
||||||
# Prepare the full device map
|
# Prepare the full device map
|
||||||
if device_map is not None:
|
if device_map is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user