[Bugfix][ModelLoader] Make enable_weights_track check quantized layers (#57108)

Signed-off-by: siliangchen-amd <SiLiang.Chen@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Shanshan Shen <467638484@qq.com>
This commit is contained in:
siliangchen-amd
2026-10-10 10:44:06 +08:00
committed by GitHub
co-authored by Cursor Shanshan Shen
parent 1dfe9fbdae
commit 02aa10539f
3 changed files with 119 additions and 4 deletions
@@ -301,7 +301,10 @@ class MoERunner(MoERunnerInterface):
def load_weights(
self, weights: Iterable[tuple[str, torch.Tensor]]
) -> Iterable[str]:
return self.routed_experts.load_weights(weights)
# routed_experts reports names relative to itself, but callers such as
# AutoWeightsLoader qualify what this returns with the runner's prefix.
for name in self.routed_experts.load_weights(weights):
yield f"routed_experts.{name}"
def _select_forward(self) -> Callable:
if current_platform.is_tpu():