[Refactor] Remove dead code (#43234)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Wentao Ye
2026-05-29 00:29:56 -04:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent d63108fb18
commit 710f077617
6 changed files with 1 additions and 51 deletions
@@ -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(
-3
View File
@@ -50,9 +50,6 @@ WEIGHT_LOADER_V2_SUPPORTED = [
"AWQLinearMethod",
"AutoGPTQLinearMethod",
"Fp8LinearMethod",
"MarlinLinearMethod",
"GPTQMarlin24LinearMethod",
"TPUInt8LinearMethod",
"FBGEMMFp8LinearMethod",
"ModelOptFp8LinearMethod",
"ModelOptFp8PcPtLinearMethod",
@@ -46,7 +46,6 @@ QuantizationMethods = Literal[
QUANTIZATION_METHODS: list[str] = list(get_args(QuantizationMethods))
DEPRECATED_QUANTIZATION_METHODS = [
"tpu_int8",
"fbgemm_fp8",
"fp_quant",
]
@@ -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"),