arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2112.08653cs.CL
收藏

反思过去:优化语言模型中的隐藏状态

Reconsidering the Past: Optimizing Hidden States in Language Models

Toyota Technological Institute at Chicago(芝加哥丰田技术研究所)

Davis Yoshida, Kevin Gimpel

摘要:

我们提出了隐藏状态优化(HSO),一种基于梯度的方法,用于提高Transformer语言模型在推理时的性能。类似于动态评估(Krause等人,2018),HSO计算语言模型分配给评估文本的对数概率的梯度,但使用它来更新缓存的隐藏状态,而不是模型参数。我们使用预训练的Transformer-XL和GPT-2语言模型测试HSO,发现WikiText 103和PG-19数据集在困惑方面有所改进,特别是在评估其训练分布之外的模型时。我们还展示了下游的适用性,显示在最近开发的基于小的Few-Shot评估设置的收益,再次没有额外的参数或训练数据。

英文摘要:

We present Hidden-State Optimization (HSO), a gradient-based method for improving the performance of transformer language models at inference time. Similar to dynamic evaluation (Krause et al., 2018), HSO computes the gradient of the log-probability the language model assigns to an evaluation text, but uses it to update the cached hidden states rather than the model parameters. We test HSO with pretrained Transformer-XL and GPT-2 language models, finding improvement on the WikiText103 and PG-19 datasets in terms of perplexity, especially when evaluating a model outside of its training distribution. We also demonstrate downstream applicability by showing gains in the recently developed prompt-based few-shot evaluation setting, again with no extra parameters or training data.

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

↑