让大模型之间用内部激活值通信,省算力还更高效。
Communicating Activations Between Language Model Agents
- 用函数融合两个大模型的中间层激活值实现通信
- 在多玩家博弈和推理任务上提升27.0%,算力减少四分之三
- 无需新增参数或数据,适合需要高效协作的模型系统
多个大模型代理间的通信已被证明能提升推理能力。尽管自然语言是主流通信方式,但其推理开销随代理数量和消息量迅速增加,且解码过程会丢失大量内部激活中的丰富信息。本文提出一种新方法:暂停模型B的计算,在中间层将模型A与模型B的激活值通过函数f融合,再输入模型B的后续层继续前向传播。该方法无需额外参数或数据,可显著降低计算成本。我们在多玩家协作游戏和推理基准上测试了多种函数f,结果表明其在各数据集上相较自然语言通信提升最高达27.0%,且所需算力不足四分之一,证明激活值作为模型间通信‘语言’具有优越性与鲁棒性。
原文摘要 · Abstract (English)
Communication between multiple language model (LM) agents has been shown to scale up the reasoning ability of LMs. While natural language has been the dominant medium for inter-LM communication, it is not obvious this should be the standard: not only does natural language communication incur high inference costs that scale quickly with the number of both agents and messages, but also the decoding process abstracts away too much rich information that could be otherwise accessed from the internal activations. In this work, we propose a simple technique whereby LMs communicate via activations; concretely, we pause an LM $\textit{B}$'s computation at an intermediate layer, combine its current activation with another LM $\textit{A}$'s intermediate activation via some function $\textit{f}$, then pass $\textit{f}$'s output into the next layer of $\textit{B}$ and continue the forward pass till decoding is complete. This approach scales up LMs on new tasks with zero additional parameters and data, and saves a substantial amount of compute over natural language communication. We test our method with various functional forms $\textit{f}$ on two experimental setups--multi-player coordination games and reasoning benchmarks--and find that it achieves up to $27.0\%$ improvement over natural language communication across datasets with $<$$1/4$ the compute, illustrating the superiority and robustness of activations as an alternative "language" for communication between LMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。