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 BORT #9813

Merged
merged 15 commits into from
Jan 27, 2021
Merged

ADD BORT #9813

merged 15 commits into from
Jan 27, 2021

Conversation

stefan-it
Copy link
Collaborator

@stefan-it stefan-it commented Jan 26, 2021

Hi,

this is a "clean" follow-up PR to the first attempt of adding Bort to Transformers (see #9112).

As Bort is based on the BERT architecture, there's no need to define own model classes, such as BortModel. This is done in the main Bort configuration via:

"model_type": "bert"

Bort uses the same vocab as RoBERTa, so the tokenizer instance is also configured in the model configuration:

"tokenizer_class": "RobertaTokenizer"

Basic integration tests and a (hopefully verbose) conversion script are also included in this PR.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Awesome! And good timing as well - adding the 40th model architecture when stars hit 40K!

@patrickvonplaten patrickvonplaten mentioned this pull request Jan 27, 2021
3 tasks
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

This is really great. The integration tests are a fantastic addition, too. Thanks for taking care of it @stefan-it, and congrats for adding the 40th model to Transformers 😄

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 adding this new model! When referencing other pages in the documentation, it's better to use :doc: instead of a hard link, as it will then work in all versions of the documentation (which don't have the same base url).

docs/source/model_doc/bort.rst Outdated Show resolved Hide resolved
docs/source/model_doc/bort.rst Outdated Show resolved Hide resolved
patrickvonplaten and others added 2 commits January 27, 2021 14:59
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
@patrickvonplaten
Copy link
Contributor

Thanks for adding this new model! When referencing other pages in the documentation, it's better to use :doc: instead of a hard link, as it will then work in all versions of the documentation (which don't have the same base url).

Sorry that was my bad! I copied it from DialoGPT -> Updated it there as well

@patrickvonplaten patrickvonplaten changed the title Bort integration 2 ADD BORT Jan 27, 2021
@sgugger
Copy link
Collaborator

sgugger commented Jan 27, 2021

Ah sorry @patrickvonplaten, the model_doc/ should be removed are the pages are in the same folder. That should resolve the build doc error.

sgugger and others added 3 commits January 27, 2021 08:05
@patrickvonplaten patrickvonplaten merged commit 5ed5a54 into huggingface:master Jan 27, 2021
@patrickvonplaten
Copy link
Contributor

Great job @stefan-it

Qbiwan pushed a commit to Qbiwan/transformers that referenced this pull request Jan 31, 2021
* tests: add integration tests for new Bort model

* bort: add conversion script from Gluonnlp to Transformers 🚀

* bort: minor cleanup (BORT -> Bort)

* add docs

* make fix-copies

* clean doc a bit

* correct docs

* Update docs/source/model_doc/bort.rst

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Update docs/source/model_doc/bort.rst

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* correct dialogpt doc

* correct link

* Update docs/source/model_doc/bort.rst

* Update docs/source/model_doc/dialogpt.rst

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* make style

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
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

4 participants