[WIP v1 - deprecated] entmax 1.5 for attention and outputs, faster implementation of sparsemax#1541
Open
bpopeters wants to merge 4 commits intoOpenNMT:masterfrom
Open
[WIP v1 - deprecated] entmax 1.5 for attention and outputs, faster implementation of sparsemax#1541bpopeters wants to merge 4 commits intoOpenNMT:masterfrom
bpopeters wants to merge 4 commits intoOpenNMT:masterfrom
Conversation
Member
|
Hi Ben, welcome back. |
Contributor
Author
|
It probably would not require very many changes, but it isn't really on our agenda since python 2 is only supported until the end of the year. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for entmax 1.5, a sparse alternative to softmax which we describe in our ACL paper, Sparse Sequence-to-Sequence Models. It uses the implementations of sparsemax and entmax-1.5 from entmax package, available from pip.
This pull request does not include support for entmax with other alpha values. I suspect the code for that will be a little bit more involved and I can get to it soon.
It also does not include support for entmax attention in transformers, but I can probably make that PR next week as well.
One potential issue is that our entmax code does not support python 2. I don't know who still needs python 2 support for OpenNMT.