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 10, 14:00 UTC
[Model] Cleanup: Remove redundant manual definition of `make_empty_intermediate_tensors` in GLM-4-MoE (#31869)
Signed-off-by: maang <maang_h@163.com>
maang committed
Jan 7, 2026 at 16:18 UTC
1f33e38e81a1b29bb4261a5e4e1fa430198b251a
1 file changed
-14
vllm/model_executor/models/glm4_moe.py
-14
@@ -478,20 +478,6 @@ class Glm4MoeModel(nn.Module):
478
hidden_states, _ = self.norm(hidden_states, residual)
479
return hidden_states
480
481
- def make_empty_intermediate_tensors(
482
- self, batch_size: int, dtype: torch.dtype, device: torch.device
483
- ) -> IntermediateTensors:
484
- return IntermediateTensors(
485
- {
486
- "hidden_states": torch.zeros(
487
- (batch_size, self.config.hidden_size), dtype=dtype, device=device
488
- ),
489
- "residual": torch.zeros(
490
- (batch_size, self.config.hidden_size), dtype=dtype, device=device
491
- ),
492
- }
493
- )
494
-
481
def get_expert_mapping(self) -> list[tuple[str, str, int, str]]:
482
# Params for weights, fp8 weight scales, fp8 activation scales
483
# (param_name, weight_name, expert_id, shard_id)