让大模型在潜空间中自我反思,提升推理准确性。
Deliberation in Latent Space via Differentiable Cache Augmentation
- 用可微缓存增强技术,在模型缓存中注入潜在表征以优化推理
- 缓存增强后解码困惑度降低,跨任务表现稳定提升
- 无需额外训练,适合需要高精度推理的场景
通过生成并关注中间推理步骤,使大语言模型(LLM)“多思考”已在解决复杂问题上展现出潜力。然而,传统方法在响应前即时生成离散标记序列,导致显著延迟且难以优化。本文提出一种新方法:为冻结的LLM添加一个离线协处理器,作用于模型的关键值(kv)缓存。该协处理器通过注入一组设计好的潜在嵌入,增强缓存以提高后续解码的保真度。协处理器使用标准预训练数据上的解码语言建模损失进行训练,而解码器保持冻结。此方法实现了端到端可微分地将额外计算量压缩至缓存中。由于解码器不变,协处理器可离线异步运行,若协处理器不可用或缓存无需额外计算,模型仍可正常工作。实验表明,缓存增强后,解码器在多个后续标记上的困惑度降低。即使无特定任务训练,缓存增强也一致降低困惑度,并提升多种推理密集型任务的表现。
原文摘要 · Abstract (English)
Techniques enabling large language models (LLMs) to "think more" by generating and attending to intermediate reasoning steps have shown promise in solving complex problems. However, the standard approaches generate sequences of discrete tokens immediately before responding, and so they can incur significant latency costs and be challenging to optimize. In this work, we demonstrate that a frozen LLM can be augmented with an offline coprocessor that operates on the model's key-value (kv) cache. This coprocessor augments the cache with a set of latent embeddings designed to improve the fidelity of subsequent decoding. We train this coprocessor using the language modeling loss from the decoder on standard pretraining data, while keeping the decoder itself frozen. This approach enables the model to learn, in an end-to-end differentiable fashion, how to distill additional computation into its kv-cache. Because the decoder remains unchanged, the coprocessor can operate offline and asynchronously, and the language model can function normally if the coprocessor is unavailable or if a given cache is deemed not to require extra computation. We show experimentally that when a cache is augmented, the decoder achieves lower perplexity on numerous subsequent tokens. Furthermore, even without any task-specific training, our experiments demonstrate that cache augmentation consistently reduces perplexity and improves performance across a range of reasoning-intensive tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。