DeepPavlov icon indicating copy to clipboard operation
DeepPavlov copied to clipboard

Multitask transformer-agnostic model

Open dimakarp1996 opened this issue 3 years ago • 1 comments

Added multitask transformer-agnostic model. Supported kinds of tasks - classification, regression, NER, multiple choice.

FIle multitask_example.json is an example of using multitask with all these kinds of tasks. FIle config_glue.json is the example of GLUE config. All configs are being trained and evaluated in the same way as original DeepPavlov configs.

File proba2labels.py is modified so as we can use it with many inputs rather than with one, thus simplifying config. Note that, to increase multitask performance, it is better to have only 1 task in every batch ( just like author of http://github.com/namisan/mt-dnn did). However, while iterating we need to have samples from every task on every step. So in that code Nones are passed where we have no samples to solve this problem. Correct handling of these Nones required modification in core.

Multitask model also supports single-task mode.

As the model is transformer-agnostic, it supports different kinds of transformers.

dimakarp1996 avatar Jul 11 '22 15:07 dimakarp1996

Тесты не прошли только из-за того, что не скачался файл vocab.txt в ner_rured с удаленного сервера huggingface, что не связано с внесенными мной изменениями.

dimakarp1996 avatar Jul 13 '22 11:07 dimakarp1996