SIGN IN SIGN UP

Restore BC for the tensor-parallel API (#48300)

* Restore backward compatibility for the tensor-parallel API

`from_pretrained` accepts `tp_plan` and `tp_size` again, a supplied plan is
applied to the model instead of being ignored, embeddings are shardable when
the weights are untied, `DistributedConfig` is exported publicly, the renamed
parallel-style classes keep their old names, and an mps host falls back to
cpu/gloo rather than refusing to run.

* Restore the plan validation the refactor turned into silent skips

An unsupported style in a config-derived plan was skipped instead of raising,
the expert dimension was floor-divided by the mesh size with no divisibility
check, and MLA lost its actionable error for a config without
`qk_rope_head_dim`.

* tp_plan deprecation warning

* warning

* better

* bc modeling utils

* bette rnaming

* doc

* doc

* let mixin handle the tied untied of embedding

* revert ai slop

* revert

* collect then raise

* update doc

* todo

* revert

* revert doc

---------

Co-authored-by: Ferdinand Mom <47445085+3outeille@users.noreply.github.com>
Co-authored-by: 3outeille <ferdinand.mom@epita.fr>
A
Arthur committed
f0e42efb2ca057209aa0a2350908578a01283018
Parent: 7d33784
Committed by GitHub <noreply@github.com> on 8/26/2026, 11:54:06 AM