vllm.config.pooler
¶
Classes:
-
PoolerConfig–Controls the behavior of output pooling in pooling models.
PoolerConfig
¶
Controls the behavior of output pooling in pooling models.
Methods:
-
compile_factors–This config does not affect the compiled graph.
Attributes:
-
dimensions(int | None) –Reduce the dimensions of embeddings if model
-
enable_chunked_processing(bool) –Whether to enable chunked processing for long inputs that exceed the model's
-
enable_flash_late_interaction(bool) –Whether the engine-side late-interaction scorer may use the fused
-
logit_mean(float | None) –If provided, subtract this value from classification logits before
-
logit_sigma(float | None) –If provided, divide the classification logits by this value after
-
max_embed_len(int | None) –Maximum input length allowed for embedding generation. When set, allows
-
pooling_type(SequencePoolingType | TokenPoolingType | None) –The pooling method used for pooling.
-
returned_token_ids(list[int] | None) –A list of indices for the vocabulary dimensions to be extracted,
-
seq_pooling_type(SequencePoolingType | None) –The pooling method used for sequence pooling.
-
step_tag_id(int | None) –If set, only the score corresponding to the
step_tag_idin the -
task(PoolingTask | None) –The task used for pooling.
-
tok_pooling_type(TokenPoolingType | None) –The pooling method used for tokenwise pooling.
-
use_activation(bool | None) –Whether to apply activation function to the pooler outputs.
dimensions = None
class-attribute
instance-attribute
¶
Reduce the dimensions of embeddings if model support matryoshka representation. Defaults to None.
enable_chunked_processing = False
class-attribute
instance-attribute
¶
Whether to enable chunked processing for long inputs that exceed the model's maximum position embeddings. When enabled, long inputs will be split into chunks, processed separately, and then aggregated using weighted averaging. This allows embedding models to handle arbitrarily long text without CUDA errors. Multimodal inputs are not supported. Defaults to False.
enable_flash_late_interaction = True
class-attribute
instance-attribute
¶
Whether the engine-side late-interaction scorer may use the fused
flash-maxsim Triton kernel. Disabled automatically when the API server
is started with --disable-flash-late-interaction; the reference
scorer is used instead.
logit_mean = None
class-attribute
instance-attribute
¶
If provided, subtract this value from classification logits before activation. Used for affine score calibration (Platt scaling): activation((logit - logit_mean) / logit_sigma). Defaults to None.
logit_sigma = None
class-attribute
instance-attribute
¶
If provided, divide the classification logits by this value after mean subtraction. Used for affine score calibration (Platt scaling): activation((logit - logit_mean) / logit_sigma). Defaults to None.
max_embed_len = None
class-attribute
instance-attribute
¶
Maximum input length allowed for embedding generation. When set, allows inputs longer than max_embed_len to be accepted for embedding models. When an input exceeds max_embed_len, it will be handled according to the original max_model_len validation logic. Defaults to None (i.e. set to max_model_len).
pooling_type = None
class-attribute
instance-attribute
¶
The pooling method used for pooling.
If set, seq_pooling_type or tok_pooling_type are automatically populated
with this field. Alternatively, users can set seq_pooling_type and
tok_pooling_type explicitly.
This field is mainly for user convenience. Internal code should always use
seq_pooling_type or tok_pooling_type instead of pooling_type.
returned_token_ids = None
class-attribute
instance-attribute
¶
A list of indices for the vocabulary dimensions to be extracted,
such as the token IDs of good_token and bad_token in the
math-shepherd-mistral-7b-prm model.
seq_pooling_type = None
class-attribute
instance-attribute
¶
The pooling method used for sequence pooling.
step_tag_id = None
class-attribute
instance-attribute
¶
If set, only the score corresponding to the step_tag_id in the
generated sentence should be returned. Otherwise, the scores for all tokens
are returned.
task = None
class-attribute
instance-attribute
¶
The task used for pooling.
tok_pooling_type = None
class-attribute
instance-attribute
¶
The pooling method used for tokenwise pooling.
use_activation = None
class-attribute
instance-attribute
¶
Whether to apply activation function to the pooler outputs.
None uses the pooler's default, which is True in most cases.
compile_factors()
¶
This config does not affect the compiled graph.
If a field starts affecting it, return
get_compile_factors(self, ignored_factors) with every other field in
ignored_factors.