-
Notifications
You must be signed in to change notification settings - Fork 538
Conversation
Codecov Report
|
Codecov Report
@@ Coverage Diff @@
## master #877 +/- ##
========================================
- Coverage 90.38% 90% -0.39%
========================================
Files 66 66
Lines 6367 6433 +66
========================================
+ Hits 5755 5790 +35
- Misses 612 643 +31
|
Job PR-877/13 is complete. |
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.
Why introduce legacy models? Can we just delete them?
@leezu the contrib.arange_like operator is not available in mxnet 1.5, which gluonnlp depends on |
Right, but there seems to be the workaround based on infer_range which you are using in this PR. That works on mxnet 1.5. Where does the workaround fall short? |
Job PR-877/14 is complete. |
Job PR-877/15 is complete. |
Job PR-877/16 is complete. |
Job PR-877/17 is complete. |
Job PR-877/18 is complete. |
Job PR-877/19 is complete. |
@leezu good point. I removed the legacy bert model definition. please review again |
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!
* change BaseTransformerEncoder forward * fix * merge _forward to hybrid_forward * if arange_like is not avaiable * fix * make transformer encoder a true hybridblock * fix lint * fix bug * use zeroslike and infer_range to avoid backprop problem * update test * Revert "update test" This reverts commit d024a0c. * more printing * fix test case * make bert hybrid * add legacy model * fix lint * fix lint * revert change for default parameter * fix arange dtype * fix lint * revert mokey patch in NMT interface * fix dtype * fix bug in arange * remove legacy model * also update bert scripts * fix lint * fix typo * remove hybridbert test
Description
This PR makes use of the infer_range attribute of the arange operator (thanks to @TaoLv and @leezu ) in MXNet to fully hybridize the BERT model.
Checklist
Essentials
Changes
Comments
The change is backward compatible. Added tests for model forward with and without optional inputs.