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

added GPTNeoXForTokenClassification #23002

Merged
merged 6 commits into from
Apr 27, 2023

Conversation

peter-sk
Copy link
Contributor

What does this PR do?

It adds the class GPTNeoXForTokenClassification, which allows using GPT NeoX models for token classification tasks. The implementation follows the one for other models (such as GPT2 and GPT Neo) closely and simply adds a linear layer after the hidden states.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker
@younesbelkada

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 26, 2023

The documentation is not available anymore as the PR was closed or merged.

Prof. Peter Schneider-Kamp added 3 commits April 26, 2023 12:47
doc
fixed extra comma that turned into a tuple
@peter-sk peter-sk marked this pull request as draft April 26, 2023 12:02
fixing forward call
@peter-sk peter-sk marked this pull request as ready for review April 26, 2023 12:34
@peter-sk
Copy link
Contributor Author

Ready for review, @ArthurZucker and @younesbelkada 👍

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Thanks for your contribution

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nit and this shoukd be good to merge, thanks a lot for your PR!

src/transformers/models/gpt_neox/modeling_gpt_neox.py Outdated Show resolved Hide resolved
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
@sgugger sgugger merged commit 614e191 into huggingface:main Apr 27, 2023
4 checks passed
@peter-sk peter-sk deleted the gpt-neox-token-classification branch April 27, 2023 15:13
gojiteji pushed a commit to gojiteji/transformers that referenced this pull request Jun 5, 2023
* initial commit

* added GPTNeoXForTokenClassification

* typo

* doc
fixed extra comma that turned into a tuple

* unifying variable names
fixing forward call

* classifier_dropout is in config

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------

Co-authored-by: Prof. Peter Schneider-Kamp <jps@ordbogen.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
* initial commit

* added GPTNeoXForTokenClassification

* typo

* doc
fixed extra comma that turned into a tuple

* unifying variable names
fixing forward call

* classifier_dropout is in config

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------

Co-authored-by: Prof. Peter Schneider-Kamp <jps@ordbogen.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

None yet

5 participants