@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6997a25ac6
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Model] Remove useless code from MiniMax implementation (#23982)

Signed-off-by: QscQ <qscqesze@gmail.com> Signed-off-by: qingjun <qingjun@minimaxi.com>

qscqesze committed Sep 3, 2025 at 19:27 UTC 6997a25ac65ed6cc3c2be6d09ca45f633a345f63
1 file changed +1 -11
vllm/model_executor/layers/mamba/linear_attn.py
+1 -11
@@ -83,17 +83,7 @@ class MiniMaxText01RMSNormTP(CustomOp):
83 variance = tensor_model_parallel_all_reduce(
84 variance) / self.tp_world
85 x = x * torch.rsqrt(variance + self.variance_epsilon)
86 -
87 - weight = self.weight
88 - if x.size(-1) != self.weight.size(0):
89 - if self.weight.size(0) < x.size(-1):
90 - repeat_count = (x.size(-1) + self.weight.size(0)) // x.size(-1)
91 - full_weight = self.weight.repeat(repeat_count)
92 - weight = full_weight[:x.size(-1)]
93 - else:
94 - weight = self.weight[:x.size(-1)]
95 -
96 - x = x.to(orig_dtype) * weight
86 + x = x.to(orig_dtype) * self.weight
87 return x
88
89 def forward(