From dcf2a590f52018ed91ff16d3ae439a0740420bca Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Wed, 26 Mar 2025 22:45:51 -0700 Subject: [PATCH] Allow torchao quantization in SiglipMLP (#15575) --- vllm/model_executor/models/siglip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/models/siglip.py b/vllm/model_executor/models/siglip.py index 518dbc73f8c54..cecad9e8935ee 100644 --- a/vllm/model_executor/models/siglip.py +++ b/vllm/model_executor/models/siglip.py @@ -208,8 +208,10 @@ class SiglipMLP(nn.Module): self.config = config self.activation_fn = get_act_fn(config.hidden_act) - # Special handling for BNB quantization - if quant_config and quant_config.get_name() == "bitsandbytes": + # Special handling for BNB and torchao quantization + if quant_config and quant_config.get_name() in [ + "bitsandbytes", "torchao" + ]: quantizable = True else: # For other quantization, we require the hidden size to be a