主观深度与时间尺度变换器:学习何时计算
Subjective Depth and Timescale Transformers: Learning Where and When to Compute
AI总结:
本文提出主观深度和时间尺度变换器,通过动态路由计算提升效率,减少75%的自我注意计算和50%的KV缓存需求。
摘要:
标准变换器(TF)架构中刚性、均匀的计算分配可能会限制其效率和可扩展性,特别是对于大规模模型和长序列。为解决这一问题,我们引入了主观深度变换器(SDT)和主观时间尺度变换器(STT),两种不同的架构,利用贝叶斯惊喜信号动态路由计算,学习在解码器-only变换器中学习计算的位置和时间。SDT在解码器-only堆栈中加入交替的决策层和动态层:决策层计算完整的块'后验'和轻量的'先验',而动态层基于贝叶斯惊喜(预期和意外变化)使用固定容量的Top-K路由,保持静态计算图。STT将这种条件计算扩展到时间域:过渡网络预测残差更新,形成时间'变化假设',从而告知路由器动态执行或跳过变换器块,以每个token处理。两者在训练过程中表现出从新颖性到预测驱动的门控的转变,表明与基于惊喜的原则一致。尽管在减少容量的情况下运行,它们提供了关于条件计算计算-准确性权衡的初步见解。所提出的架构建立了一个灵活的框架,减少了自我注意计算75%和KV缓存需求50%,为更高效的模型铺平了道路。
英文摘要:
The rigid, uniform allocation of computation in standard Transformer (TF) architectures can limit their efficiency and scalability, particularly for large-scale models and long sequences. Addressing this, we introduce Subjective Depth Transformers (SDT) and Subjective Timescale Transformers (STT), two distinct architectures that leverage Bayesian surprise signals to dynamically route computation, learning where and when to compute within decoder-only TFs. SDT augments a decoder-only stack with alternating Decision and Dynamic layers: a Decision layer computes a full block 'posterior' and a lightweight 'prior,' while a Dynamic layer employs fixed-capacity Top-K routing based on Bayesian surprise (Expected and Unexpected Change), maintaining a static compute graph. STT extends this conditional computation to the temporal domain: a transition network predicts residual updates, forming a temporal 'change hypothesis' that informs a router to dynamically execute or bypass TF blocks for each token, managing KV-cache contributions. Both architectures exhibit the predicted shift from novelty to prediction driven gating over training, suggesting alignment with surprise based principles. While operating at reduced capacity, they offer preliminary insights into the compute-accuracy trade-offs of conditional computation. The proposed architectures establish a flexible framework for efficiency, reducing self-attention computation by 75% and KV-cache requirements by 50% within each compute skipping layer, setting a pathway for more efficient models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。