[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:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
d63108fb18
commit
710f077617
@@ -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")
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user