[ROCm]Transpose compressed-tensors MoE weights on device (#59253)

Co-authored-by: Andreas Karatzas <akaratza@amd.com>

Aarushi Jain committed Sep 30, 2026 at 12:44 UTC b33e1cb172609343166ee485bf97c0a6f11587cf
1 file changed +4 -1
vllm/model_executor/layers/fused_moe/routed_experts.py
+4 -1
@@ -691,7 +691,10 @@ class RoutedExperts(PluggableLayer):
691 )
692 and is_transposed
693 ):
694 - loaded_weight = loaded_weight.t().contiguous()
694 + # Transpose on the parameter's device: a CPU transpose of the
695 + # mmap view reads the file column-wise, which is very slow on
696 + # NFS. The contiguous .to() reads it sequentially.
697 + loaded_weight = loaded_weight.to(param.device).t().contiguous()
698
699 if shard_id not in ("w1", "w2", "w3"):
700 raise ValueError(f"shard_id must be ['w1','w2','w3'] but got {shard_id}.")