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

Add BART converter and Chinese BART models #4636

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

gongel
Copy link
Member

@gongel gongel commented Feb 3, 2023

PR types

New features

PR changes

Others

Description

  • Add BART model converter from torch to paddlepaddle
  • Add Chinese BART models
    • fnlp/bart-base-chinese
    • fnlp/bart-large-chinese
    • uer/bart-base-chinese-cluecorpussmall
    • uer/bart-chinese-6-960-cluecorpussmall
    • uer/bart-large-chinese-cluecorpussmall
    • uer/bart-chinese-4-768-cluecorpussmall
    • HIT-TMG/dialogue-bart-base-chinese
    • HIT-TMG/dialogue-bart-large-chinese-DuSinc
    • HIT-TMG/dialogue-bart-large-chinese
    • shibing624/bart4csc-base-chinese
    • IDEA-CCNL/Randeng-BART-139M-QG-Chinese
    • IDEA-CCNL/Randeng-BART-759M-Chinese-BertTokenizer
    • IDEA-CCNL/Randeng-BART-139M-SUMMARY
    • IDEA-CCNL/Randeng-BART-139M

Use like

from paddlenlp.transformers import BartForConditionalGeneration
model = BartForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-BART-139M")

@CLAassistant
Copy link

CLAassistant commented Feb 3, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


gongel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@paddle-bot
Copy link

paddle-bot bot commented Feb 3, 2023

Thanks for your contribution!

@gongel
Copy link
Member Author

gongel commented Feb 3, 2023

后续可支持AutoConverter,黑客马拉松选手也可参考该实现。

@gongel gongel requested a review from wj-Mcat February 3, 2023 07:10
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #4636 (1a6fca8) into develop (18be55d) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #4636      +/-   ##
===========================================
- Coverage    42.10%   42.06%   -0.05%     
===========================================
  Files          433      434       +1     
  Lines        61796    61862      +66     
===========================================
+ Hits         26019    26021       +2     
- Misses       35777    35841      +64     
Impacted Files Coverage Δ
paddlenlp/transformers/bart/converter.py 0.00% <0.00%> (ø)
paddlenlp/utils/downloader.py 62.55% <0.00%> (+0.88%) ⬆️

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.

模型自动转化能力由AutoConverter承载,请参考#4477 添加bart结构

@sijunhe sijunhe merged commit 55fc1af into PaddlePaddle:develop Feb 13, 2023
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