Allennlp: Is it possible to use the BERT model instead of bidaf for reading comprehension?

Created on 25 Feb 2019  路  4Comments  路  Source: allenai/allennlp

I'm working on a small project where I feed in some text documents and I can ask questions on them. Basically a re implementation of the online reading comprehension demo. My biggest issue with the bidaf machine comprehension model is that it wasn't as accurate as I would have hoped for so I have two questions.

First question is, by using bert, would there be a noticeable difference in answer quality that the model returns? I've seen that bert has some incredible results on the squad data set which leads to my second question.

I was wondering if it is possible to use BERT instead of the bidaf model? If anyone could provide any tips on how I would go about doing so, it would be greatly appreciated.

(I'm very new to the world of NLP so I apologize if my questions are very basic)

Most helpful comment

Just FYI, for anyone following this or finding it later, we now have an allennlp Model that's backed by the hugging face code, which means you can use it to serve a demo, or extend it easily with our APIs. It should be merged in here in the next week or two, and we'll update our demo to add it when it's merged.

All 4 comments

I want to get a BERT model into our reading comprehension demo, but it'll be a little while before that happens. For now, you're probably best off using the Hugging Face pretrained BERT library directly: https://github.com/huggingface/pytorch-pretrained-BERT.

Thank you! Will look into that so.

Just FYI, for anyone following this or finding it later, we now have an allennlp Model that's backed by the hugging face code, which means you can use it to serve a demo, or extend it easily with our APIs. It should be merged in here in the next week or two, and we'll update our demo to add it when it's merged.

Can you please tell that model name which is backed by hugging face code?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silencemaker picture silencemaker  路  4Comments

tokestermw picture tokestermw  路  4Comments

epwalsh picture epwalsh  路  4Comments

masashi-y picture masashi-y  路  4Comments

MeiqiGuo picture MeiqiGuo  路  4Comments