A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 6, 21:45 UTC
Remove unused config field from Gemma2 (#36672)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Mar 11, 2026 at 08:51 UTC
f4ae58b38b8ab1d36707344518d699e9019201cc
1 file changed
+2
-5
vllm/model_executor/models/gemma2.py
+2
-5
@@ -63,7 +63,6 @@ class Gemma2MLP(nn.Module):
63
self,
64
hidden_size: int,
65
intermediate_size: int,
66
- hidden_act: str,
66
hidden_activation: str,
67
quant_config: QuantizationConfig | None = None,
68
prefix: str = "",
@@ -83,11 +82,10 @@ class Gemma2MLP(nn.Module):
82
quant_config=quant_config,
83
prefix=f"{prefix}.down_proj",
84
)
86
- if not (hidden_act == hidden_activation == "gelu_pytorch_tanh"):
85
+ if not (hidden_activation == "gelu_pytorch_tanh"):
86
raise ValueError(
87
"Gemma2 uses `gelu_pytorch_tanh` as the hidden activation "
89
- "function. Please set `hidden_act` and `hidden_activation` to "
90
- "`gelu_pytorch_tanh`."
88
+ "function. Please set `hidden_activation` to `gelu_pytorch_tanh`."
89
)
90
self.act_fn = GeluAndMul(approximate="tanh")
91
@@ -212,7 +210,6 @@ class Gemma2DecoderLayer(nn.Module):
210
self.mlp = Gemma2MLP(
211
hidden_size=self.hidden_size,
212
intermediate_size=config.intermediate_size,
215
- hidden_act=config.hidden_act,
213
hidden_activation=config.hidden_activation,
214
quant_config=quant_config,
215
prefix=f"{prefix}.mlp",