mirror of
https://github.com/wassname/vllm.git
synced 2026-08-14 12:50:37 +08:00
[Misc] Fused MoE Marlin support for GPTQ (#8217)
This commit is contained in:
@@ -24,10 +24,18 @@ def get_model_architecture(
|
||||
# Special handling for quantized Mixtral.
|
||||
# FIXME(woosuk): This is a temporary hack.
|
||||
mixtral_supported = ["fp8", "compressed-tensors"]
|
||||
# for gptq_marlin, only run fused MoE for int4
|
||||
if model_config.quantization == "gptq_marlin":
|
||||
hf_quant_config = getattr(model_config.hf_config,
|
||||
"quantization_config", None)
|
||||
if hf_quant_config and hf_quant_config.get("bits") == 4:
|
||||
mixtral_supported.append("gptq_marlin")
|
||||
|
||||
if (model_config.quantization is not None
|
||||
and model_config.quantization not in mixtral_supported
|
||||
and "MixtralForCausalLM" in architectures):
|
||||
architectures = ["QuantMixtralForCausalLM"]
|
||||
|
||||
return ModelRegistry.resolve_model_cls(architectures)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user