Long-context LLM inference is bottlenecked not by compute but by the O(n) memory bandwidth cost of scanning the KV cache at every decode step -- a wall that no amount of arithmetic scaling can break. Recent photonic accelerators have demonstrated impressive throughput for dense attention computation; however, these approaches inherit the same O(n) memory scaling as electronic attention when applied to long contexts. We observe that the real leverage point is the coarse block-selection step: a memory-bound similarity search that determines which KV blocks to fetch. We identify, for the first time, that this task is structurally matched to the photonic broadcast-and-weight paradigm -- the query fans out to all candidates via passive splitting, signatures are quasi-static (matching electro-optic MRR programming), and only rank order matters (relaxing precision to 4-6 bits). Crucially, the photonic advantage grows with context length: as N increases, the electronic scan cost rises linearly while the photonic evaluation remains O(1). We instantiate this insight in PRISM (Photonic Ranking via Inner-product Similarity with Microring weights), a thin-film lithium niobate (TFLN) similarity engine. Hardware-impaired needle-in-a-haystack evaluation on Qwen2.5-7B confirms 100% accuracy from 4K through 64K tokens at k=32, with 16x traffic reduction at 64K context. PRISM achieves a four-order-of-magnitude energy advantage over GPU baselines at practical context lengths (n >= 4K).


翻译:长上下文LLM推理的瓶颈不在于计算,而在于每次解码步扫描KV缓存时O(n)的存储带宽开销——这是一道任何算术扩展都无法突破的“存储墙”。近期光子加速器在密集注意力计算中展现了惊人的吞吐量;然而,这些方法在应用于长上下文时,继承了与电子注意力相同的O(n)存储扩展特性。我们发现,真正的杠杆点在于粗粒度块选择步骤:一个决定加载哪些KV块的存储受限相似度搜索。我们首次识别出,该任务在结构上与光子广播-加权范式匹配——查询通过无源分路扇出至所有候选块,签名准静态(匹配电光微环谐振器编程),且仅需排名顺序(精度可放宽至4-6比特)。关键在于,光子优势随上下文长度增长:当N增大时,电子扫描成本线性上升,而光子评估保持O(1)。我们基于这一洞察实现了PRISM(基于微环权重的内积相似度光子排名引擎),一种薄膜铌酸锂(TFLN)相似度处理引擎。在Qwen2.5-7B上进行的硬件受损“大海捞针”评估表明,从4K到64K token且k=32时,准确率达100%,在64K上下文下流量降低16倍。在实用上下文长度(n≥4K)下,PRISM相较GPU基线实现了四个数量级的能效优势。

0
下载
关闭预览

相关内容

TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
专知会员服务
16+阅读 · 2021年6月4日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
注意力机制可解释吗?这篇ACL 2019论文说……
机器之心
11+阅读 · 2019年6月16日
长文本表示学习概述
云栖社区
15+阅读 · 2019年5月9日
一文详解LSTM网络
论智
18+阅读 · 2018年5月2日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
干货|从LSTM到Seq2Seq
全球人工智能
15+阅读 · 2018年1月9日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
4+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关资讯
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
注意力机制可解释吗?这篇ACL 2019论文说……
机器之心
11+阅读 · 2019年6月16日
长文本表示学习概述
云栖社区
15+阅读 · 2019年5月9日
一文详解LSTM网络
论智
18+阅读 · 2018年5月2日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
干货|从LSTM到Seq2Seq
全球人工智能
15+阅读 · 2018年1月9日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员