Update Bert support#78
Conversation
OfirArviv
commented
Jul 31, 2019
- Update readme
- Prepare for release
- Filter passages for bert
- minor fixes
…nizer) if using bert
…h the LazyLoading mechanism
README.md
Outdated
| To download and extract [a multilingual model](https://github.com/huji-nlp/tupa/releases/download/v1.3.10/ucca-bilstm-1.3.10.tar.gz), run: | ||
|
|
||
| curl -LO https://github.com/huji-nlp/tupa/releases/download/v1.4.0/bert_multilingual_layers_4_layers_pooling_weighted_align_sum.tar.gz | ||
| tar xvzf ucca-bilstm-1.3.10.tar.gz |
There was a problem hiding this comment.
Why is the model named 1.3.10 if it's under the 1.4.0 release?
There was a problem hiding this comment.
copy-paste mistake
There was a problem hiding this comment.
Btw, in case you are wondering - the url doesn't exists yet. I just concluded what it will be once I make the release based on others uploads.
There was a problem hiding this comment.
@danielhers Pay attention. As the url in the readme is not created yet, you should approve this PR only if you ok with merging it to huji/tupa and creating a new release.
README.md
Outdated
| Run the parser using the model: | ||
|
|
||
| python -m tupa example.txt --lang [example lang] -m models/bert_multilingual_layers_4_layers_pooling_weighed_align_sum --use-bert --bert-model bert-base-multilingual-cased --bert-layers -1 -2 -3 -4 --bert-layers-pooling weighed --bert-token-align-by sum --bert-multilingual 0 | ||
| python -m tupa example.txt --lang [example lang] -m bert_multilingual_layers_4_layers_pooling_weighed_align_sum --use-bert --bert-model bert-base-multilingual-cased --bert-layers -1 -2 -3 -4 --bert-layers-pooling weighed --bert-token-align-by sum --bert-multilingual 0 |
There was a problem hiding this comment.
Actually, shouldn't the bert-specific paramters be saved to the model .json and loaded in model.py load()?
Also, [example lang] is not a language; should be explained.
There was a problem hiding this comment.
I was planning on doing this in the "final version" (with xlm, leno, etc.), but it's probably better to so now, as people who are not familiar with the code might use it. I'll work on it.
There was a problem hiding this comment.
How will it work if the params will be loaded from model.json but the user also pass the argument in the command?
There was a problem hiding this comment.
The JSON will have to override the user since we can't distinguish whether Argparser's attributes are from the command line or from the default values.
There was a problem hiding this comment.
Adding new commit.
Tested on:
- Creating a new mode without bert and reloading it.
- Creating a bert model and reloading it
- reloading a model created from the vanilla tupa code