arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.02226cs.CLcs.AIcs.LG
收藏

三思而后行:使用暂停标记训练语言模型

Think before you speak: Training Language Models With Pause Tokens

Carnegie Mellon University(卡内基梅隆大学);Google Research(谷歌研究院)

Sachin Goyal, Ziwei Ji, Ankit Singh Rawat, Aditya Krishna Menon, Sanjiv Kumar, Vaishnavh Nagarajan

AI总结:

提出在语言模型中引入可学习的pause标记,延迟输出以增加计算量,在1B和130M参数模型上验证了pause-training在9个任务中的8个上取得增益。

摘要:

语言模型通过连续产生一系列标记来生成回复:第$(K+1)^{th}$个标记是通过对每层$K$个隐藏向量(每个前置标记一个向量)进行操作的结果。如果我们让模型在输出第$(K+1)^{th}$个标记之前操作比如$K+10$个隐藏向量会怎样?我们通过在语言模型上使用(可学习的)$\ extit{pause}$标记进行训练和推理来实现这一想法,一系列$\ extit{pause}$标记被附加到输入前缀中。然后我们延迟提取模型的输出,直到看到最后一个$\ extit{pause}$标记,从而允许模型在确定答案之前处理额外的计算。我们在1B和130M参数的decoder-only模型上实证评估$\ extit{pause-training}$,使用C4进行因果预训练,并在涵盖推理、问答、一般理解和事实回忆的下游任务上进行评估。我们的主要发现是,当模型在预训练和微调时都使用延迟时,推理时的延迟显示出增益。对于1B模型,我们在9个任务中的8个上看到增益,最显著的是在SQuAD的问答任务上EM得分增加$18\%$,在CommonSenseQA上增加$8\%$,在GSM8k的推理任务上准确率增加$1\%$。我们的工作提出了一系列概念和实践上的未来研究问题,即如何使延迟的下一个标记预测成为一种广泛适用的新范式。

英文摘要:

Language models generate responses by producing a series of tokens in immediate succession: the $(K+1)^{th}$ token is an outcome of manipulating $K$ hidden vectors per layer, one vector per preceding token. What if instead we were to let the model manipulate say, $K+10$ hidden vectors, before it outputs the $(K+1)^{th}$ token? We operationalize this idea by performing training and inference on language models with a (learnable) $\textit{pause}$ token, a sequence of which is appended to the input prefix. We then delay extracting the model's outputs until the last pause token is seen, thereby allowing the model to process extra computation before committing to an answer. We empirically evaluate $\textit{pause-training}$ on decoder-only models of 1B and 130M parameters with causal pretraining on C4, and on downstream tasks covering reasoning, question-answering, general understanding and fact recall. Our main finding is that inference-time delays show gains when the model is both pre-trained and finetuned with delays. For the 1B model, we witness gains on 8 of 9 tasks, most prominently, a gain of $18\%$ EM score on the QA task of SQuAD, $8\%$ on CommonSenseQA and $1\%$ accuracy on the reasoning task of GSM8k. Our work raises a range of conceptual and practical future research questions on making delayed next-token prediction a widely applicable new paradigm.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑