@@ -2084,7 +2084,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
|
|||||||
if plan := getattr(module, "_tp_plan", None):
|
if plan := getattr(module, "_tp_plan", None):
|
||||||
self._tp_plan.update({f"{name}.{k}": v for k, v in plan.copy().items()})
|
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.5"):
|
if self._tp_plan is not None and is_torch_greater_or_equal("2.5") and _torch_distributed_available:
|
||||||
for _, v in self._tp_plan.items():
|
for _, v in self._tp_plan.items():
|
||||||
if v not in ALL_PARALLEL_STYLES:
|
if v not in ALL_PARALLEL_STYLES:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
|||||||
Reference in New Issue
Block a user