NExT-QA icon indicating copy to clipboard operation
NExT-QA copied to clipboard

Can you provide the BERT features of the candidate answers?

Open zhangxi1997 opened this issue 3 years ago • 7 comments

Hi, thanks for your sharing. I wonder can you provide the pre-trained BERT features of the candidate answers? Thanks a lot!

zhangxi1997 avatar Jul 25 '21 14:07 zhangxi1997

Thanks for your interest. As we finetune BERT for multi-choice QA, each answer is appended to the question as a global sentence. If you want the separated candidate feature, you can split the provided global-sentence feature according to the format (1): [CLS] question [SEP] option_0 [SEP], and the token representations behind the first '[SEP]' belong to the candidate answer. You need to use BERT's buildin tokenizer to get the tokenized represetantion of the sentence (1) and find the index of ['SEP'].

doc-doc avatar Jul 25 '21 14:07 doc-doc

Thanks for your quick reply. And I wonder can you provide the finetune BERT to help me extract the candidate answer features?

zhangxi1997 avatar Jul 26 '21 07:07 zhangxi1997

Hi, currently, we are not going to release this part of code, but you can refer to this file for details.

doc-doc avatar Jul 26 '21 14:07 doc-doc

Hi,

Thanks for the explanation. Can you let me know what loss is used for fine-tuning bert?

junwenchen avatar Jul 31 '22 23:07 junwenchen

It's softmax cross-entropy.

doc-doc avatar Aug 01 '22 03:08 doc-doc

Hi, please find the edited code for fintuning BERT on NExT-QA here. You can also fine-tune other datasets by using the code.

doc-doc avatar Aug 01 '22 03:08 doc-doc

Thanks a lot

junwenchen avatar Aug 06 '22 18:08 junwenchen