Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
158 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Reconsidering the Past: Optimizing Hidden States in Language Models (2112.08653v1)

Published 16 Dec 2021 in cs.CL

Abstract: We present Hidden-State Optimization (HSO), a gradient-based method for improving the performance of transformer LLMs at inference time. Similar to dynamic evaluation (Krause et al., 2018), HSO computes the gradient of the log-probability the LLM 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 LLMs, 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.

Citations (2)

Summary

We haven't generated a summary for this paper yet.