vllm.model_executor.models.transformers.fuser ¶
Fuser detection for the Transformers modeling backend.
Classes:
-
Fusers–Mapping from module class and shape to fusers, for all fusable modules.
Functions:
-
get_fuser–The first
fuser_clsthat applies tomodule, if one does. -
get_fusers–Every fuser that could apply to
module's class (cached), inFUSERSorder. -
key–Cache key for
get_fusers. Considers module type and its immediate children.
Attributes:
-
FUSERS(tuple[type[BaseFuser], ...]) –Every fuser, in priority order: those that redefine the forward first, then those
FUSERS = (MLAFuser, GLUFuser, QKVFuser, PackedQKVFuser, MergedColumnParallelFuser, RMSNormFuser, AttentionFuser) module-attribute ¶
Every fuser, in priority order: those that redefine the forward first, then those that leave it alone. A new fuser is added here.
Fusers ¶
Bases: UserDict
Mapping from module class and shape to fusers, for all fusable modules.
Methods:
-
__getitem__–The fusers this instance can take, in the order to apply them.
Source code in vllm/model_executor/models/transformers/fuser.py
__getitem__(m) ¶
The fusers this instance can take, in the order to apply them.
Source code in vllm/model_executor/models/transformers/fuser.py
get_fuser(module, fuser_cls) ¶
The first fuser_cls that applies to module, if one does.
get_fusers(module) ¶
Every fuser that could apply to module's class (cached), in FUSERS order.
Source code in vllm/model_executor/models/transformers/fuser.py
key(module) ¶
Cache key for get_fusers. Considers module type and its immediate children.