mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
parent
e0545ef0b8
commit
051a8acc9a
@ -2084,7 +2084,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.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():
|
||||
if v not in ALL_PARALLEL_STYLES:
|
||||
raise ValueError(
|
||||
|
Loading…
Reference in New Issue
Block a user