vllm.model_executor.models.bert
¶
Classes:
-
BertEmbeddingModel–A model that uses Bert to provide embedding functionalities.
-
BertForMaskedLM–Bert with a masked-language-modeling head on top of
BertModel. -
BertForSequenceClassification–A model that uses Bert to provide embedding functionalities.
-
BertSpladeSparseEmbeddingModel–BertEmbeddingModel + SPLADE sparse embedding.
-
SPLADESparsePooler–SPLADE sparse pooling:
BertEmbeddingModel
¶
Bases: Module, SupportsQuant, SupportsLoRA
A model that uses Bert to provide embedding functionalities.
This class encapsulates the BertModel and provides an interface for embedding operations and customized pooling functions.
Attributes:
-
model–An instance of BertModel used for forward operations.
-
_pooler–An instance of Pooler used for pooling operations.
BertForMaskedLM
¶
Bases: Module
Bert with a masked-language-modeling head on top of BertModel.
Produces per-token logits over the vocabulary. In vLLM terms this is a
token-level pooling model (tok_pooling_type="ALL"): the encoder output
is projected by the MLM head to vocab_size logits for every position,
and the token pooler returns one vector per token.
BertForSequenceClassification
¶
Bases: Module, SupportsCrossEncoding, SupportsQuant, SupportsLoRA
A model that uses Bert to provide embedding functionalities.
This class encapsulates the BertModel and provides an interface for embedding operations and customized pooling functions.
Attributes:
-
model–An instance of BertModel used for forward operations.
-
_pooler–An instance of Pooler used for pooling operations.
BertSpladeSparseEmbeddingModel
¶
Bases: BertEmbeddingModel
BertEmbeddingModel + SPLADE sparse embedding. - Make logits by self.mlm_head - pooler: SPLADESparsePooler(mlm_head...)