Skip to content

Fix FlaxRoFormerClassificationHead activation#16168

Merged
ydshieh merged 1 commit intohuggingface:masterfrom
ydshieh:fix_flax_roformer_classification_head
Mar 17, 2022
Merged

Fix FlaxRoFormerClassificationHead activation#16168
ydshieh merged 1 commit intohuggingface:masterfrom
ydshieh:fix_flax_roformer_classification_head

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Mar 15, 2022

What does this PR do?

Current FlaxRoFormerClassificationHead use hard-coded activation nn.tanh, but the PyTorch version RoFormerClassificationHead use ACT2FN[self.config.hidden_act] which is by default gelu (and this is the one used by the default checkpoint's config).

This PR fixes this activation issue in FlaxRoFormerClassificationHead.

@ydshieh
Copy link
Collaborator Author

ydshieh commented Mar 15, 2022

To get more familiar with the library management/maintenance, I would like hear from you regarding: does this count as a breaking change?

Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 15, 2022

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

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.

I think it's a bug fix and not a breaking change. Thanks for fixing!

@ydshieh
Copy link
Collaborator Author

ydshieh commented Mar 17, 2022

Merge now since this is clearly a bug, as well as a tiny change

@ydshieh ydshieh merged commit 25b8f9a into huggingface:master Mar 17, 2022
FrancescoSaverioZuppichini pushed a commit that referenced this pull request Mar 21, 2022
* fix activation

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
FrancescoSaverioZuppichini pushed a commit that referenced this pull request Mar 24, 2022
* fix activation

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
@ydshieh ydshieh deleted the fix_flax_roformer_classification_head branch May 5, 2022 10:33
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.

4 participants