跳到正文
NVIDIA Developer Blog· Timmy Liu·· 15 天前AI 评分34

NVIDIA 如何为高效长上下文推理协同设计稀疏注意力

Co-Designing Sparse Attention for Efficient Long-Context Inference

AI 导读

面向智能体负载、长文档和大型代码库将上下文从数万 token 推向数十万 token 的需求,NVIDIA 探讨稀疏注意力的协同设计。稠密注意力需为每个 query 计算所有 key,单 query 成本随上下文长度 N 增长,在 128K token 时可能占据大部分 prefill 时间。

正文

Agentic workloads, long documents, and large codebases are pushing context lengths from tens of thousands of tokens to hundreds of thousands. At those lengths,...

Agentic workloads, long documents, and large codebases are pushing context lengths from tens of thousands of tokens to hundreds of thousands. At those lengths, attention becomes the most expensive part of a transformer layer. Dense attention scores every query against every key, so its cost per query grows with the context length N, and at 128K tokens it can take most of the prefill time in a…

Source

来源:NVIDIA Developer Blog · developer.nvidia.com