PRISM:通过O(1)光子块选择突破长上下文LLM推理的O(n)内存瓶颈
PRISM: Breaking the O(n) Memory Wall in Long-Context LLM Inference via O(1) Photonic Block Selection
AI总结:
PRISM通过光子广播与加权范式,实现长上下文LLM推理中O(n)内存带宽的突破,采用O(1)光子块选择方法,显著提升效率与能效比。
摘要:
长上下文LLM推理的瓶颈并非计算能力,而是每次解码步骤中扫描KV缓存的O(n)内存带宽成本——这一瓶颈无法通过单纯算力提升突破。最近的光子加速器在密集注意力计算中表现出色,但应用于长上下文时仍继承了电子注意力的O(n)内存扩展性。我们发现真正的杠杆点在于粗粒度块选择步骤:一个内存受限的相似性搜索,决定要获取哪些KV块。我们首次发现,这一任务在结构上与光子广播与加权范式相匹配——查询通过被动分裂广播到所有候选者,签名是准静态的(匹配电光MRR编程),只有排名顺序重要(放松精度到4-6位)。关键的是,光子优势随着上下文长度增长:当N增加时,电子扫描成本线性增长,而光子评估保持O(1)。我们通过PRISM(通过内积相似性进行光子排序的微环权重)将这一洞察具体化,这是一种薄膜锂铌酸盐(TFLN)相似性引擎。在Qwen2.5-7B上的硬件受限的针在 haystack 中评估证实,在4K到64K tokens范围内,k=32时准确率100%,在64K上下文时交通减少16倍。PRISM在实用上下文长度(n≥4K)上相比GPU基线具有四数量级的能效优势。
英文摘要:
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).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。