Skip to content

vllm.model_executor.layers.pooler

Modules:

  • abstract –
  • common –
  • seqwise –

    Poolers that produce an output aggregating all tokens in the sequence.

  • special –
  • tokwise –

    Poolers that produce an output for each token in the sequence.

Classes:

  • BOSEOSFilter –

    Filters the BOS and EOS token results from outputs.

  • DispatchPooler –

    Dispatches calls to a sub-pooler based on the pooling task.

  • Pooler –

    The interface required for all poolers used in pooling models in vLLM.

  • PoolingParamsUpdate –

BOSEOSFilter

Bases: Pooler

Filters the BOS and EOS token results from outputs.

DispatchPooler

Bases: Pooler

Dispatches calls to a sub-pooler based on the pooling task.

Methods:

replace_classifier(new_classifier)

Replaces the classifier to the LoRA-wrapped version.

Pooler

Bases: Module, ABC

The interface required for all poolers used in pooling models in vLLM.

Methods:

get_pooling_updates(task)

Construct the updated pooling parameters to use for a supported task.

get_supported_tasks() abstractmethod

Determine which pooling tasks are supported.

PoolingParamsUpdate dataclass

Attributes:

requires_token_ids = False class-attribute instance-attribute

Set this flag to enable CPU prompt token IDs for your pooler.