From 710f07761741fbc20e33e8383f1b0e4c16e4655f Mon Sep 17 00:00:00 2001 From: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Date: Fri, 29 May 2026 00:29:56 -0400 Subject: [PATCH] [Refactor] Remove dead code (#43234) Signed-off-by: yewentao256 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- vllm/_custom_ops.py | 23 ------------------- vllm/config/speculative.py | 10 -------- .../layers/fused_moe/fused_moe.py | 14 +---------- vllm/model_executor/layers/linear.py | 3 --- .../layers/quantization/__init__.py | 1 - vllm/model_executor/models/qwen3_dflash.py | 1 - 6 files changed, 1 insertion(+), 51 deletions(-) diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index 84f944df2b..3222913d15 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -3719,29 +3719,6 @@ def matmul_mxf4_bf16_tn( return torch.ops._qutlass_C.matmul_mxf4_bf16_tn(a, b, a_sf, b_sf, alpha) -if hasattr(torch.ops._qutlass_C, "matmul_ada_mxf4_bf16_tn"): - - @register_fake("_qutlass_C::matmul_ada_mxf4_bf16_tn") - def _fake_matmul_ada_mxf4_bf16_tn( - a: torch.Tensor, - b: torch.Tensor, - a_sf: torch.Tensor, - b_sf: torch.Tensor, - alpha: torch.Tensor, - ): - return a.new_empty(*a.shape[:-1], b.shape[0], dtype=torch.bfloat16) - - -def matmul_ada_mxf4_bf16_tn( - a: torch.Tensor, - b: torch.Tensor, - a_sf: torch.Tensor, - b_sf: torch.Tensor, - alpha: torch.Tensor, -) -> torch.Tensor: - return torch.ops._qutlass_C.matmul_ada_mxf4_bf16_tn(a, b, a_sf, b_sf, alpha) - - if hasattr(torch.ops._qutlass_C, "fusedQuantizeMxQuest"): @register_fake("_qutlass_C::fusedQuantizeMxQuest") diff --git a/vllm/config/speculative.py b/vllm/config/speculative.py index c76edaad0e..e388987d6d 100644 --- a/vllm/config/speculative.py +++ b/vllm/config/speculative.py @@ -724,16 +724,6 @@ class SpeculativeConfig: "multiple times of forward on same MTP layer" ",which may result in lower acceptance rate" ) - elif self.draft_model_config.hf_config.model_type in ( - "longcat_flash_mtp" - ): - self.method = "longcat_flash_mtp" - if self.num_speculative_tokens > 1: - logger.warning( - "LongCat MTP models only have " - "one layer. Might need some code changes " - "to support multiple layers." - ) elif self.method == "draft_model": pass else: diff --git a/vllm/model_executor/layers/fused_moe/fused_moe.py b/vllm/model_executor/layers/fused_moe/fused_moe.py index e13ef52c01..49957c8f5e 100644 --- a/vllm/model_executor/layers/fused_moe/fused_moe.py +++ b/vllm/model_executor/layers/fused_moe/fused_moe.py @@ -1518,7 +1518,6 @@ def fused_experts( def _get_config_quant_dtype( use_fp8_w8a8: bool, use_int8_w8a8: bool, - ocp_mx_scheme: str | None, ) -> None | torch.dtype | str: """ Get the quantization type based on the quantization strategy flags. @@ -1529,18 +1528,8 @@ def _get_config_quant_dtype( """ if use_fp8_w8a8: return current_platform.fp8_dtype() - elif use_int8_w8a8: + if use_int8_w8a8: return torch.int8 - elif ocp_mx_scheme == "w_mxfp4_a_mxfp4": - return "mxfp4" - elif ocp_mx_scheme in {"w_mxfp4_a_mxfp6_e3m2", "w_mxfp6_e3m2_a_mxfp6_e3m2"}: - return "mxfp6_e3m2" - elif ocp_mx_scheme in {"w_mxfp4_a_mxfp6_e2m3", "w_mxfp6_e2m3_a_mxfp6_e2m3"}: - return "mxfp6_e2m3" - elif ocp_mx_scheme in {"w_mxfp4", "w_mxfp6_e3m2", "w_mxfp6_e2m3"}: - return torch.bfloat16 - elif ocp_mx_scheme in {"w_mxfp4_a_fp8", "w_mxfp6_e3m2_a_fp8", "w_mxfp6_e2m3_a_fp8"}: - return torch.float8_e4m3fn return None @@ -1615,7 +1604,6 @@ def fused_experts_impl( quant_dtype = _get_config_quant_dtype( use_fp8_w8a8=use_fp8_w8a8, use_int8_w8a8=use_int8_w8a8, - ocp_mx_scheme=None, ) get_config_func = functools.partial( diff --git a/vllm/model_executor/layers/linear.py b/vllm/model_executor/layers/linear.py index dbd5577ee0..e50a0e6b00 100644 --- a/vllm/model_executor/layers/linear.py +++ b/vllm/model_executor/layers/linear.py @@ -50,9 +50,6 @@ WEIGHT_LOADER_V2_SUPPORTED = [ "AWQLinearMethod", "AutoGPTQLinearMethod", "Fp8LinearMethod", - "MarlinLinearMethod", - "GPTQMarlin24LinearMethod", - "TPUInt8LinearMethod", "FBGEMMFp8LinearMethod", "ModelOptFp8LinearMethod", "ModelOptFp8PcPtLinearMethod", diff --git a/vllm/model_executor/layers/quantization/__init__.py b/vllm/model_executor/layers/quantization/__init__.py index 2506c62d39..0e83f80aeb 100644 --- a/vllm/model_executor/layers/quantization/__init__.py +++ b/vllm/model_executor/layers/quantization/__init__.py @@ -46,7 +46,6 @@ QuantizationMethods = Literal[ QUANTIZATION_METHODS: list[str] = list(get_args(QuantizationMethods)) DEPRECATED_QUANTIZATION_METHODS = [ - "tpu_int8", "fbgemm_fp8", "fp_quant", ] diff --git a/vllm/model_executor/models/qwen3_dflash.py b/vllm/model_executor/models/qwen3_dflash.py index 231ed646e0..25f139f26c 100644 --- a/vllm/model_executor/models/qwen3_dflash.py +++ b/vllm/model_executor/models/qwen3_dflash.py @@ -509,7 +509,6 @@ class DFlashQwen3ForCausalLM(Qwen3ForCausalLM): target_layer_num = vllm_config.model_config.get_num_layers( vllm_config.parallel_config ) - self.config.target_layer_count = target_layer_num self.model = DFlashQwen3Model( vllm_config=vllm_config, prefix=maybe_prefix(prefix, "model"),