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

【Hackathon 4th No.102】给AutoConverter增加新的模型组网的支持 Distilbert #5672

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

megemini
Copy link
Contributor

PR types

New features

PR changes

APIs

Description

【Hackathon 4th No.102】给AutoConverter增加新的模型组网的支持 Distilbert

Hackathon 4th No.102 这个任务里面有5个模型,我计划每个模型单独提PR,这个PR是处理 distilbert 模型。

  • 使用的测试模型 hf-internal-testing/tiny-random-DistilBertModel
  • 这个模型 paddlenlptransformers 的参数有几个不一样,我在 configuration.py 中进行了映射:
      attribute_map: Dict[str, str] = {
          "dropout": "classifier_dropout",
          "num_classes": "num_labels",
          "n_layers": "num_hidden_layers",  # for `transformers`
          "n_heads": "num_attention_heads",  # for `transformers`
          "dim": "hidden_size",  # for `transformers`
          "hidden_dim": "intermediate_size",  # for `transformers`
      }

@wj-Mcat @sijunhe 请评审,谢谢!:)

@paddle-bot
Copy link

paddle-bot bot commented Apr 14, 2023

Thanks for your contribution!

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #5672 (3337b60) into develop (848f5c1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #5672      +/-   ##
===========================================
+ Coverage    59.60%   59.61%   +0.01%     
===========================================
  Files          483      483              
  Lines        68134    68155      +21     
===========================================
+ Hits         40610    40633      +23     
+ Misses       27524    27522       -2     
Impacted Files Coverage Δ
paddlenlp/transformers/distilbert/configuration.py 100.00% <100.00%> (ø)
paddlenlp/transformers/distilbert/modeling.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@sijunhe sijunhe left a comment

Choose a reason for hiding this comment

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

非常好,赞!

@sijunhe sijunhe merged commit 7a6baa7 into PaddlePaddle:develop Apr 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants