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

Can FlexAttention Optimize Masks for Large Table Constraints? #106

Open
RaphaelMouravieff opened this issue Jan 15, 2025 · 1 comment
Open

Comments

@RaphaelMouravieff
Copy link

Hello,

I’m currently working on fitting large tables into encoder models. To achieve this, I flatten the table into a text and calculate self-attention across the entire text. However, for very large tables, this approach becomes infeasible due to memory and computational constraints.

To address this, I aim to constrain the attention to specific parts of the table, such as tokens within the same row or column. My idea is to use a custom attention mask that limits interactions to these regions, reducing the complexity.

Given that Attention Gym supports optimized attention implementations with efficient memory usage and time-saving mechanisms, I was wondering:
• Do you think a mask of this nature (row- or column-constrained attention) could benefit from your implementation?
• Is it a problem if mask are different for every tables?

Thank you in advance !

@Chillee
Copy link
Contributor

Chillee commented Jan 18, 2025

@RaphaelMouravieff Yes that sounds like it should work well!

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

No branches or pull requests

2 participants