Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions vllm/model_executor/models/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ def _init_pooler(self, vllm_config: "VllmConfig", prefix: str = ""):
hidden_size,
config.num_labels,
bias=False,
params_dtype=torch.float32,
Copy link
Collaborator

@jeejeelee jeejeelee Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use params_dtype=vllm_config.model_config.head_dtype

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please add params_dtype=vllm_config.model_config.head_dtype to _create_pooling_model_cls, as reference:
    noooop@c427c9b#diff-d85c8d9a87dd68e2c04e4d9bb9e1c4493646c7fc6ee877ee574dc7805bf6f57aR130-R266

this code wasn’t committed after numerous rebases. at #23810

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quant_config=quant_config,
prefix=maybe_prefix(prefix, "score"),
)
Expand Down Expand Up @@ -339,7 +338,7 @@ def _init_pooler(self, vllm_config: "VllmConfig", prefix: str = ""):
})

def _classifier(self, x: torch.Tensor):
x, _ = self.score(x.float())
x, _ = self.score(x)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
x, _ = self.score(x)
x = x.to(self.vllm_config.model_config.head_dtype)
x, _ = self.score(x)

return x

def forward(
Expand Down