Skip to content

Commit

Permalink
Fixed bug for from_config_with_defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Went-Liang <[email protected]>
  • Loading branch information
Went-Liang committed Oct 29, 2024
1 parent dd9342b commit 4e468a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vllm/model_executor/layers/pooler.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def from_config_with_defaults(
softmax: bool,
step_tag_id: Optional[int] = None,
returned_token_ids: Optional[List[int]] = None,
) -> "Pooler":
) -> Optional["Pooler"]:
if pooler_config is None:
return None
return cls(
pooling_type=PoolingType[pooler_config.pooling_type]
if pooler_config.pooling_type is not None else pooling_type,
Expand Down

0 comments on commit 4e468a3

Please sign in to comment.