Skip to content

Commit 303edff

Browse files
antrecgemini-code-assist[bot]
authored andcommitted
Update vllm/model_executor/models/modernbert.py
Added dropout layer in forward, which should not have effect at inference, though, but I still kept it in case, and to match huggingface architecture so that weight loading is simplified. Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: antrec <antoine.recanati@gmail.com>
1 parent 99c94cc commit 303edff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/model_executor/models/modernbert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,6 @@ def forward(
448448
inputs_embeds=inputs_embeds,
449449
intermediate_tensors=intermediate_tensors,
450450
)
451-
hidden_states = self.head(hidden_states)
451+
hidden_states = self.drop(self.head(hidden_states))
452452
hidden_states = hidden_states.to(self.head_dtype)
453453
return self.classifier(hidden_states)

0 commit comments

Comments
 (0)