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

[hotfix][minor] Poolformer does not need projections #349

Merged

Conversation

blefaudeux
Copy link
Contributor

@blefaudeux blefaudeux commented Jul 3, 2022

What does this PR do?

Not a functional bug, but the projection layers were built for something like poolformer (using the pooling attention mechanism), even if not being used. This took some space in memory, and led to a false number of exposed parameters for the whole model. There was one flag missing to tell xformers that this mechanism does not require projections.
Issue caught when having a look at #347

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.

@blefaudeux blefaudeux requested a review from dianaml0 July 3, 2022 13:22
@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 Jul 3, 2022
@blefaudeux blefaudeux requested a review from fmassa July 3, 2022 13:22
@blefaudeux blefaudeux force-pushed the poolformer_skip_projections branch from b2c3e40 to 52c8322 Compare July 3, 2022 13:23
@blefaudeux
Copy link
Contributor Author

one liner, landing that due to very low risk and some existing backlog, I hope that's ok @fmassa @dianaml0

@blefaudeux blefaudeux force-pushed the poolformer_skip_projections branch from e485752 to 027b9a8 Compare July 3, 2022 13:27
@blefaudeux blefaudeux merged commit 6c003f1 into facebookresearch:main Jul 3, 2022
@blefaudeux blefaudeux deleted the poolformer_skip_projections branch July 3, 2022 13:28
bertmaher pushed a commit to bertmaher/xformers that referenced this pull request Dec 20, 2024
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.

2 participants