Jet-QSparse:基于4位稀疏注意力加速智能体大语言模型推理
Jet-QSparse: Accelerating Agentic LLM Inference with 4-Bit Sparse Attention
AI总结:
Jet-QSparse是一种无需训练的4位稀疏注意力方法,通过结合NVFP4缓存存储与Blackwell张量核心的FP4计算,在不损失精度的前提下提升智能体大语言模型的解码速度与KV缓存容量。
摘要:
长程推理和智能体工作负载会给KV缓存容量和解码注意力吞吐量带来压力。我们提出Jet-QSparse,这是一种无需训练的方法,将紧凑的NVFP4缓存存储与Blackwell张量核心上的原生FP4查询-键计算相结合。密集扫描对完整键历史进行评分,选择128-token块以进行稀疏FP16值聚合(采用FP32累加),在输出形成步骤中保留更高精度,同时支持连续块加载。校准后的键中心化以及每个序列和层最多2个BF16页解决了量化误差;FP8预填充使用临时 arena,而持久缓存直接从BF16激活值打包。在四个混合大语言模型上,每个KV头128块的预算在评估的数学推理、编码和智能体基准上未检测到精度损失,尽管一些更小的预算会导致损失。在1个GB300上,上下文长度128K、批量大小16时,64块预算下Qwen3.8-27B实现了比密集BF16高1.94倍的端到端解码加速,且测得的Qwen KV池提供了BF16的2.58至2.76倍的token容量。
英文摘要:
Long-horizon reasoning and agentic workloads strain KV-cache capacity and decode attention throughput. We present Jet-QSparse, a training-free method that combines compact NVFP4 cache storage with native FP4 query-key computation on Blackwell tensor cores. A dense scan scores the full key history and selects 128-token blocks for sparse FP16 value aggregation with FP32 accumulation, preserving higher precision in the output-forming step while enabling contiguous tile loads. Calibrated key centering and at most two BF16 pages per sequence and layer address quantization error; FP8 prefill uses a temporary arena while the persistent cache is packed directly from BF16 activations. Across four hybrid LLMs, a budget of 128 blocks per KV head shows no detected accuracy loss on the evaluated mathematical reasoning, coding, and agentic benchmarks, although some smaller budgets incur losses. With 64 blocks, Qwen3.8-27B achieves a $1.94\times$ end-to-end decode speedup over dense BF16 at 128K context and batch size 16 on one GB300, and the measured Qwen KV pools provide $2.58$-$2.76\times$ BF16's token capacity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。