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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Outer product mean #160

Closed
wants to merge 2 commits into from
Closed

[Draft] Outer product mean #160

wants to merge 2 commits into from

Conversation

blefaudeux
Copy link
Contributor

@blefaudeux blefaudeux commented Dec 20, 2021

What does this PR do?

Checking with @gahdritz, this is quickly put together but does the line 3 from Algorithm 10 ()
Screenshot from 2021-12-20 14-31-05
(context is this issue and that one )

It's not obvious to me that openfold does a mean though (see) and I'm not sure that the constraints on the dimensions will be super nice for you (this takes A(s, i) and B(s, i) and return -optionally fused mean over s, else sum over s- A x B (outer product i,j wise)). This is just the FW, checking principles before diving further

TODOs

  • perf (placeholder right now)
  • proper batch dimension handling

Before submitting

  • Did you have fun?
    • Make sure you had fun coding 馃檭
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
    • N/A
  • Did you make sure to update the docs?
    • N/A
  • Did you write any new necessary tests?
    • N/A
  • Did you update the changelog? (if needed)
    • N/A

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 20, 2021
@gahdritz
Copy link

gahdritz commented Dec 21, 2021

Wow this is great! We recently implemented low-memory attention from that Rabe & Staats preprint, so this is exactly what we needed.

It's not obvious to me that openfold does a mean though (see)

In OpenFold, the mean division is just delayed until the very end (here).

@blefaudeux
Copy link
Contributor Author

slower than pytorch for now, needs more work, closing the PR for now.. this would be useful for the causal path & Favor, interesting

@blefaudeux blefaudeux closed this Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants