Fix all import errors based on older torch versions (#38370)
* Update masking_utils.py * fix * fix * fix * Update masking_utils.py * Update executorch.py * fix
This commit is contained in:
@@ -2078,7 +2078,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
|
||||
if plan := getattr(module, "_tp_plan", None):
|
||||
self._tp_plan.update({f"{name}.{k}": v for k, v in plan.copy().items()})
|
||||
|
||||
if self._tp_plan is not None and is_torch_greater_or_equal("2.3"):
|
||||
if self._tp_plan is not None and is_torch_greater_or_equal("2.5"):
|
||||
for _, v in self._tp_plan.items():
|
||||
if v not in ALL_PARALLEL_STYLES:
|
||||
raise ValueError(
|
||||
|
||||
Reference in New Issue
Block a user