-
Notifications
You must be signed in to change notification settings - Fork 532
[SCRIPT] - Add static BERT base export script (for use with MXNet Module API) #672
[SCRIPT] - Add static BERT base export script (for use with MXNet Module API) #672
Conversation
Codecov Report
@@ Coverage Diff @@
## master #672 +/- ##
=========================================
+ Coverage 90.94% 91.04% +0.1%
=========================================
Files 64 64
Lines 5887 5887
=========================================
+ Hits 5354 5360 +6
+ Misses 533 527 -6
|
Nice bot 🤖 |
Job PR-672/1 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.
Thanks for the contribution, @gigasquid (and glad to see you here!). Do you intend to use such model for feature extraction with mxnet module?
@szha The intent is to use of BERT to more than just inference in the Clojure/Scala MXNet apis. Initially, I'm interested in the fine tuning tasks like classification, but feature extraction would be cool too. Basically everything in this http://jalammar.github.io/illustrated-bert/ Thanks so much for the static export feature! It opens up a whole new BERT world for the JVM MXNet langs 💯 @haven-jeon - Good point on the parameters. I'll double check to see if they are all used and remove the ones that are not. |
I was able to put together a walkthrough Clojure jupyter notebook and then export it to markdown 😸 The PR for MXNet is here apache/mxnet#14769 I'll plan on spending some time tomorrow to double check this script and the params. |
@haven-jeon - I cleaned up some unneeded args and checked the rest. Please take another look when you have a chance. |
Job PR-672/5 is complete. |
@gigasquid we recently upgraded the CI setup. It will work once you rebase the PR to latest master. |
48bdfc3
to
965e799
Compare
Job PR-672/1 is complete. |
4538d52
to
ff8a1f4
Compare
Job PR-672/3 is complete. |
add docs add test adjust params
ff8a1f4
to
54dfc1d
Compare
Job PR-672/4 is complete. |
Job PR-672/5 is complete. |
57d393a
to
e50f320
Compare
Job PR-672/7 is complete. |
Job PR-672/8 is complete. |
Job PR-672/10 is complete. |
tests & docs adds and CI is green 💚 - please take another look when you get a chance |
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.
nice work!
…ule API) (#672) * Add static BERT base export (for using with MXNet Module API) add docs add test adjust params * remove unused out variable * add test and tweak doc
…ule API) (dmlc#672) * Add static BERT base export (for using with MXNet Module API) add docs add test adjust params * remove unused out variable * add test and tweak doc
Description
This will export the base BERT model for use with the MXNet Module API.
It was adapted from the
static_export_squad.py
Use cases can include fine tuning for Clojure and Scala APIs.
Checklist
Essentials
Comments
Python is not my usual language - so feedback is welcome :)