Skip to content

Conversation

@KarlFelixJoehnk
Copy link
Contributor

What does this PR do?

It simply moves the attention_head_size in the distilbert model to be an object attribute. This is necessary if you want to use the Distilbert model in the nn_pruning library. It will also benefit anyone who ever needs to access the attention_head_size attribute from an instance of a Distilbert model. This change is consistent with other transformer models in this library (see BERT https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L253 or BART https://github.com/huggingface/transformers/blob/main/src/transformers/models/bart/modeling_bart.py#L157)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 3, 2023

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.

Thanks for your PR. Could you just run make style on your branch to fix the quality issue?

@KarlFelixJoehnk
Copy link
Contributor Author

Thanks for your PR. Could you just run make style on your branch to fix the quality issue?

Hi @sgugger, thanks for the quick approval. Just fixed the code style

@sgugger sgugger merged commit a3c3782 into huggingface:main Jan 9, 2023
@sgugger
Copy link
Collaborator

sgugger commented Jan 9, 2023

Thanks again for your contribution!

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.

3 participants