Skip to content

scaled_dot_product_attention throws an error when both attn_mask and is_causal are set #80

Open
@moskomule

Description

@moskomule

Hi, thanks for developing a very wonderful project.

I found torch.nn.functional.scaled_dot_product_attention throws an error when both attn_mask and is_causal are set .
But, currently the language_model.py code uses both.

is_causal=True # LM attention is causal (masked)

A simple fix is to create a causal mask by yourself, but if there's other ways, I want to know.

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