-
Notifications
You must be signed in to change notification settings - Fork 538
[SCRIPT][API] Add RoBERTa fine-tuning scripts, add BERTClassifier to API #931
Conversation
This reverts commit 67139eb.
Codecov Report
@@ Coverage Diff @@
## master #931 +/- ##
========================================
+ Coverage 88.89% 89.7% +0.8%
========================================
Files 67 67
Lines 6360 6408 +48
========================================
+ Hits 5654 5748 +94
+ Misses 706 660 -46
|
Job PR-931/1 is complete. |
Job PR-931/2 is complete. |
Job PR-931/4 is complete. |
RoBERTa model has a slightly different Classifier structure by default (assuming the fairseq as the official implementation): Might deserve its own Classifier of sort |
Job PR-931/9 is complete. |
Job PR-931/10 is complete. |
Job PR-931/11 is complete. |
Job PR-931/12 is complete. |
What is this RoBERT? Any reference? |
Job PR-931/13 is complete. |
Job PR-931/15 is complete. |
Job PR-931/16 is complete. |
src/gluonnlp/data/transforms.py
Outdated
@@ -1221,17 +1221,29 @@ class BERTSentenceTransform: | |||
Tokenizer for the sentences. | |||
max_seq_length : int. | |||
Maximum sequence length of the sentences. | |||
vocab : Vocab or BERTVocab | |||
The vocabulary. |
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.
It is not clear that different vocabularies are required/handled for different BERT style models. Let's document that cls_token
, sep_token
is used if available and otherwise fallback to bos_token
, eos_token
.
To formally specify the expected attributes ( cls_token
, sep_token
, etc.) one could (eventually) use Structural subtyping https://mypy.readthedocs.io/en/latest/protocols.html
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.
Nit
Job PR-931/17 is complete. |
Description
@hhexiy
Checklist
Essentials
Changes
Comments