iqiyi/FASPell

NSP

rejae opened this issue · 2 comments

rejae commented

想了解一下,这里的pretrain中的NSP,看了一下代码,并没有发现a_tokens和b_tokens有来自同一个句子的可能性,都是随机挑句子拼接成AAAABBBB,那么这里的NSP有什么用?毕竟Bert文中这样描述:

Specifically,
when choosing the sentences A and B for each pretraining example, 50% of the time B is the actual
next sentence that follows A (labeled as IsNext), and 50% of the time it is a random sentence from
the corpus (labeled as NotNext).

请问作者能否为我指点迷津。谢谢### @eugene-yh @jwu26

想了解一下,这里的pretrain中的NSP,看了一下代码,并没有发现a_tokens和b_tokens有来自同一个句子的可能性,都是随机挑句子拼接成AAAABBBB,那么这里的NSP有什么用?毕竟Bert文中这样描述:

Specifically,
when choosing the sentences A and B for each pretraining example, 50% of the time B is the actual
next sentence that follows A (labeled as IsNext), and 50% of the time it is a random sentence from
the corpus (labeled as NotNext).

请问作者能否为我指点迷津。谢谢### @eugene-yh @jwu26

您好,我们代码生成的tf record不包含这部分判断两个句子是否相邻的任务。我们只用BERT中的掩码语言模型任务来做预训练。

rejae commented

谢谢,这里随机挑选拼接应该是满足输入格式了。