WIP Conversion from/to huggingface's downstream models#196
Conversation
|
Ok let's merge this basic version & increase functionality in subsequent PRs (especially for NER etc.) |
|
Hi everyone, I tried converting some models. For multi-label text classification head it tells me that only 1 head is allowed. I can work around that. However, for a model with TokenClassificationHead it tells me the following: Any idea what's going on there? Thanks. |
|
With a single prediction head I get the following error. It doesn't matter which script (w/ or w/o classification). |
About `Unexpected key(s) in state_dict: "loss_fct.weight"We currently do not support class weights when converting models. So you would need to train a FARM model without class weights or somehow exclude the weights from conversion. About `AttributeError: 'TokenClassificationHead' object has no attribute 'label_list'Could you please create a separate issue with a minimal example script, so we can reproduce your error? Similar to how we managed #553 |
Let's improve the compatibility with huggingface's transformers. So far we could only load the LanguageModel and Tokenizer from their format.
I really like the idea of their new model hub (https://github.com/huggingface/transformers).
Let's add support to use those downstream models in FARM (huggingface -> FARM) and vice-versa upload FARM models there (FARM -> huggingface).
With this, there's no "lock-in" for users and they can choose whatever framework works best for them in their phase of development :)