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

Fix albert tokenizer #1535

Merged
merged 7 commits into from
Dec 31, 2021
Merged

Fix albert tokenizer #1535

merged 7 commits into from
Dec 31, 2021

Conversation

yingyibiao
Copy link
Contributor

PR types

Bug fixes

PR changes

Models

Description

Fix albert tokenizer

ZeyuChen
ZeyuChen previously approved these changes Dec 29, 2021
Copy link
Member

@ZeyuChen ZeyuChen left a comment

Choose a reason for hiding this comment

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

LGTM

pad_token="[PAD]",
cls_token="[CLS]",
mask_token="[MASK]"):
def __init__(self, vocab_file, do_lower_case=False, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

还要确认下这里使用**kwargs是否合适及加载既有保存的config是否有问题,咱们的基类会将init的参数作为config进行保存

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里使用 kwargs 可以使得用 from_pretrained 方法的时候可以传入自定义的config参数;
经过自测,可以加载既有保存的config。

@yingyibiao yingyibiao linked an issue Dec 30, 2021 that may be closed by this pull request
@ZeyuChen ZeyuChen merged commit b27c647 into PaddlePaddle:develop Dec 31, 2021
@yingyibiao yingyibiao deleted the fix_albert branch January 10, 2022 06:12
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.

AlbertTokenizer Pad的id是否正确?
3 participants