cdQA icon indicating copy to clipboard operation
cdQA copied to clipboard

XLNet support for Reader

Open DanBigioi opened this issue 6 years ago • 4 comments

Hi, Currently the reader is operating using a pre trained BERT pytorch model. I am wondering whether you plan on adding support for an XLNet pretrained model once it is released for pytorch?

DanBigioi avatar Jul 10 '19 11:07 DanBigioi

Indeed having a XLNet reader would be a nice addition to cdQA given its results on the QA tasks.

The @huggingface community is currently implementing XLNet in their Transformers repository. See this PR: https://github.com/huggingface/pytorch-pretrained-BERT/pull/711

We are waiting for the official code release to start reverse-engineering the script in order to see if it would be easy to add it to cdQA.

We might need some help though so feel free to comment or PR if you have ideas!

andrelmfarias avatar Jul 10 '19 22:07 andrelmfarias

related: https://github.com/renatoviolin/xlnet

alex-movila avatar Jul 16 '19 13:07 alex-movila

@huggingface just released their new update, so we started to explore XLNet for cdQA (PR #205)

n0thingLLM avatar Jul 16 '19 17:07 n0thingLLM

Implementation of XLNetForQuestionAnswering is pretty different from BertForQuestionAnswering and the official HF version does not output the logits for now. (cf. https://github.com/huggingface/pytorch-transformers/issues/838)

XLNetForQuestionAnswering uses Beam Search to find the best (and more probable) span, while BertForQuestionAnswering maximises the start_score and end_score separately.

Due to this limitation, the XLNet (and XLM) support for the Reader will take a bit more time than expected.

andrelmfarias avatar Jul 24 '19 08:07 andrelmfarias