-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Improve documentation coverage for Phobert #9427
Conversation
update my fork with lastest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Qbiwan!
Can't pin you for review @sgugger, so tagging you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
docs/source/model_doc/phobert.rst
Outdated
# For transformers v4.x+: | ||
tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base", use_fast=False) | ||
|
||
# For transformers v3.x: | ||
# tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to differentiate the code. In v4+, when a fast tokenizer is not available, the library will use the slow one. So just tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base")
is good enough!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reduced to a single line tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base")
What does this PR do?
Fixes #9035
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors which may be interested in your PR.