Revert "[ModelOpt] Fix Weight Loading for DSR1-FP4 Quantization (#9712)" (#10176)

This commit is contained in:
Yineng Zhang
2025-09-08 11:28:15 -07:00
committed by GitHub
parent 9a18aa54c2
commit 45b3a6a256
2 changed files with 2 additions and 10 deletions
+2 -3
View File
@@ -235,9 +235,8 @@ class ReplicatedLinear(LinearBase):
loaded_weight = loaded_weight[:1]
else:
raise ValueError(f"{loaded_weight} are not all equal")
assert (
param.size() == loaded_weight.size()
), f"Loading weight error: param: {param.size()}, loaded_weight: {loaded_weight.size()}"
assert param.size() == loaded_weight.size()
param.data.copy_(loaded_weight)
def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: