Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/enable flex_attention #1906

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix/enable flex_attention #1906

wants to merge 1 commit into from

Conversation

notlober
Copy link

@notlober notlober commented Mar 5, 2025

this line weirdly have two paths false for flex attention, is it a bug?:

try:
    from torch.nn.attention.flex_attention import (
        flex_attention as _flex_attention,
        create_block_mask as _create_block_mask,
    )
    _flex_attention = torch.compile(_flex_attention, dynamic = True, options = torch_compile_options)
    HAS_FLEX_ATTENTION = False
except:
    HAS_FLEX_ATTENTION = False
pass

first one should have

HAS_FLEX_ATTENTION = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant