362. Google QUEST Q&A Labeling | google-quest-challenge
恭喜获奖者,并感谢我的队友( @theoviel @cl2ev1 @mathurinache @titericz )。以下是我们解决方案中关键点的简要概述:
loss_fct = nn.BCEWithLogitsLoss(pos_weight=torch.Tensor([
0.9, 1, 1.5, 0.8, 0.8, 0.8, 0.96, 1.1, 1.1, 3, 1, 1.1, 2, 3, 3, 2, 1, 2, 1, 2, 0.9, 0.75, 0.9, 0.75, 0.75, 0.7, 1, 2.5, 1, 0.75]))
betas=(0.5, 0.999),且无偏置衰减(bias decay)设为 1。这是我们为 bert-base 方法选择的定制架构思路:
[CLS] title [Q] question [A] answer [SEP],ID 为 [0, … 0, 1, …., 1, 2, …, 2]。我们使用 [SEP] 标记的值初始化特殊标记。定制 ID 也使用模型值进行了初始化。n=8 层的 [CLS] 标记,应用大小为 m=1024 的全连接层和 tanh 激活函数,然后将所有内容拼接起来。category 和 host 列的嵌入(+ tanh)。我们将它们与定制池化器的输出拼接并获得 logits。还进行了一些文本清理(latex、url、空格、反斜杠)。它们基于相同的架构。我们使用两个输入:
[Q] title [SEP] question [SEP] 用于 token,[0, … 0, 1, …., 1] 用于 ID。[A] title [SEP] answer[SEP] 用于 token,[0, … 0, 1, …., 1] 用于 ID。[Q] 和 [A] 以 [CLS] 标记的值开头。