Skip to content

vllm.model_executor.models.transformers.pooling

Transformers modeling backend mixins for pooling models.

Classes:

ClassifierWithReshape

Bases: Module

Token extraction has already been applied in pooler.pooling.

Add dim to match expected input shape of classifier.forward, and remove it again if the classifier is applied at every position (e.g. LayoutLMv3's).