Skip to content

how to compare mamba with flashattention2 #27

@xiayuqing0622

Description

@xiayuqing0622

In your paper, you mentioned that mamba scan is faster than flashattention2.
Does it mean comparing

class SelectiveScanFn(torch.autograd.Function):
with https://github.com/Dao-AILab/flash-attention/blob/9356a1c0389660d7e231ff3163c1ac17d9e3824a/flash_attn/flash_attn_interface.py#L432 ?
The inputs of these two modules are different, is this comparation fair? Or the preprocessing(compute q, k, v in flashattention; compute A,B,C,D,delta in mamba scan) need to be be taken into account?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions