vllm.model_executor.models.interfaces_base ¶
VllmModel ¶
Bases: Protocol[T_co]
The interface required for all models in vLLM.
Source code in vllm/model_executor/models/interfaces_base.py
VllmModelForPooling ¶
Bases: VllmModel[T_co], Protocol[T_co]
The interface required for all pooling models in vLLM.
Source code in vllm/model_executor/models/interfaces_base.py
attn_type class-attribute ¶
Indicates the vllm.config.model.ModelConfig.attn_type to use by default.
You can use the vllm.model_executor.models.interfaces_base.attn_type decorator to conveniently set this field.
default_seq_pooling_type class-attribute ¶
Indicates the vllm.config.pooler.PoolerConfig.seq_pooling_type to use by default.
You can use the vllm.model_executor.models.interfaces_base.default_pooling_type decorator to conveniently set this field.
default_tok_pooling_type class-attribute ¶
Indicates the vllm.config.pooler.PoolerConfig.tok_pooling_type to use by default.
You can use the vllm.model_executor.models.interfaces_base.default_pooling_type decorator to conveniently set this field.
VllmModelForTextGeneration ¶
attn_type ¶
Decorator to set VllmModelForPooling.attn_type.
default_pooling_type ¶
default_pooling_type(
*,
seq_pooling_type: SequencePoolingType = "LAST",
tok_pooling_type: TokenPoolingType = "ALL",
)
Decorator to set VllmModelForPooling.default_*_pooling_type.