Skip to content

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_cls that applies to module, if one does.

  • get_fusers –

    Every fuser that could apply to module's class (cached), in FUSERS order.

  • 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.

  • add –

    Detect the fusers of module and its submodules, except skip's.

__getitem__(m)

The fusers this instance can take, in the order to apply them.

add(module, skip=None)

Detect the fusers of module and its submodules, except skip's.

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.

key(module)

Cache key for get_fusers. Considers module type and its immediate children.