Skip to content

How to implement 4D attention mask within Flashattn? #5

@Yxxxb

Description

@Yxxxb
Image

As shown in the figure, I would like to know how to implement such a 4D attention mask, or interleaved attention (i.e. some tokens use bidirectional attention and some tokens use casual attention) in Flashattn?

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