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

Add is_causal API for TransformerDecoder #97166

Closed
wants to merge 2 commits into from

Conversation

janEbert
Copy link
Contributor

The same API is implemented for TransformerEncoder, where this argument is passed through to the sublayers.

The same API is implemented for `TransformerEncoder`, where this
argument is passed through to the sublayers.
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 20, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/97166

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 8808120:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@cpuhrsch cpuhrsch requested a review from mikekgfb March 20, 2023 23:39
@cpuhrsch cpuhrsch added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 20, 2023
@facebook-github-bot
Copy link
Contributor

@mikekgfb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

tgt → memory

Previous error was replicated due to copy-pasting; now fixed for both
occurrences.
@mikekgfb
Copy link
Contributor

@janEbert should this also cover class Decoder?

@janEbert
Copy link
Contributor Author

Sorry, I think my message was unclear. I meant that the API is already implemented for TransformerEncoder; this just implements the same thing for TransformerDecoder.
Did I understand you correctly?

@mikekgfb
Copy link
Contributor

mikekgfb commented Mar 24, 2023 via email

@facebook-github-bot
Copy link
Contributor

@mikekgfb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mikekgfb mikekgfb added this to the 2.1.0 milestone Mar 24, 2023
@mikekgfb
Copy link
Contributor

@pytorchbot merge -f "updated diff"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@mikekgfb
Copy link
Contributor

@janEbert can you please submit a PR that updates the definition of *_is_causal in docstrings, based on the change in #97214 which replaces the mutual exclusivity and makes *_is_causal a hint. (Bad things happen when the hint incorrectly asserts the attention mask is causal, when it is not. The other direction works fine when is_causal is False but the matrix actually contains a causal mask)

@janEbert
Copy link
Contributor Author

@mikekgfb Thanks for merging already. :)
I'll gladly do both things you mentioned, updating the docstring and implementing the API for Transformer as well. Cheers!

@mikekgfb
Copy link
Contributor

mikekgfb commented Mar 27, 2023 via email

janEbert added a commit to janEbert/pytorch that referenced this pull request Apr 4, 2023
janEbert added a commit to janEbert/pytorch that referenced this pull request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants