@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8c9117181d
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

[Misc] Remove typing.List (#26150)

Signed-off-by: Varun Sundar Rabindranath <vsundarr@redhat.com> Co-authored-by: Varun Sundar Rabindranath <vsundarr@redhat.com>

Varun Sundar Rabindranath committed Oct 3, 2025 at 03:00 UTC 8c9117181d58f552f5bdb236f093123b6837dfb0
1 file changed +3 -6
vllm/model_executor/layers/fused_moe/fused_moe.py
+3 -6
@@ -4,9 +4,6 @@
4 import functools
5 import json
6 import os
7 -# torch.compile needs typing.List. It will fail torch.library.infer_schema
8 -# otherwise
9 -from typing import List # noqa: UP035
7 from typing import Any, Callable, Optional, Union
8
9 import torch
@@ -1229,7 +1226,7 @@ def inplace_fused_experts(
1226 w2_zp: Optional[torch.Tensor] = None,
1227 a1_scale: Optional[torch.Tensor] = None,
1228 a2_scale: Optional[torch.Tensor] = None,
1232 - block_shape: Optional[List[int]] = None, #noqa: UP006
1229 + block_shape: Optional[list[int]] = None,
1230 w1_bias: Optional[torch.Tensor] = None,
1231 w2_bias: Optional[torch.Tensor] = None,
1232 ) -> None:
@@ -1263,7 +1260,7 @@ def inplace_fused_experts_fake(
1260 w2_zp: Optional[torch.Tensor] = None,
1261 a1_scale: Optional[torch.Tensor] = None,
1262 a2_scale: Optional[torch.Tensor] = None,
1266 - block_shape: Optional[List[int]] = None, #noqa: UP006
1263 + block_shape: Optional[list[int]] = None,
1264 w1_bias: Optional[torch.Tensor] = None,
1265 w2_bias: Optional[torch.Tensor] = None,
1266 ) -> None:
@@ -1302,7 +1299,7 @@ def outplace_fused_experts(
1299 w2_zp: Optional[torch.Tensor] = None,
1300 a1_scale: Optional[torch.Tensor] = None,
1301 a2_scale: Optional[torch.Tensor] = None,
1305 - block_shape: Optional[List[int]] = None, #noqa: UP006
1302 + block_shape: Optional[list[int]] = None,
1303 w1_bias: Optional[torch.Tensor] = None,
1304 w2_bias: Optional[torch.Tensor] = None,
1305 ) -> torch.Tensor: