跳到正文
北京时间
原文
Qwen· @Alibaba_Qwen · X·· 2026-04-29精选AI 评分66
AI 导读

FlashQLA是基于TileLang开发的高性能线性注意力内核,专为提升个人设备上智能体AI性能而设计。它实现了2-3倍的前向传播加速和2倍的反向传播加速。其核心技术包括门控驱动的片上自动计算与通信重叠、硬件友好的代数重构,以及TileLang融合的Warp专用内核。该设计通过自动片上通信重叠显著提升了流处理器利用率,在张量并行、小模型和长上下文任务中效果突出。尽管在大批量处理时,其将GDN流程拆分为两个内核的策略会带来额外内存开销,但在边缘设备和长上下文实际场景中性能更优。反向传播部分通过构建16级、严格片上内存限制下的Warp专用流水线,实现了超过2倍的内核级加速。

推荐理由

Qwen 把线性注意力的推理效率压到了新台阶,2-3 倍加速对想做本地 Agent 的开发者是实打实的,不是论文灌水,是能跑在设备上的代码。

正文 · 原文

🚀 Introducing FlashQLA: high-performance linear attention kernels built on TileLang.

⚡ 2–3× forward speedup. 2× backward speedup.
💻 Purpose-built for agentic AI on your personal devices.

💡Key insights:
1. Gate-driven automatic intra-card CP.
2. Hardware-friendly algebraic reformulation.
3. TileLang fused warp-specialized kernels.

FlashQLA boosts SM utilization via automatic intra-device CP. The gains are especially pronounced for TP setups, small models, and long-context workloads.

Instead of fusing the entire GDN flow into a single kernel, we split it into two kernels optimized for CP and backward efficiency. At large batch sizes this incurs extra memory I/O overhead vs. a fully fused approach, but it delivers better real-world performance on edge devices and long-context workloads.

The backward pass was the hardest part: we built a 16-stage warp-specialized pipeline under extremely tight on-chip memory constraints, ultimately achieving 2×+ kernel-level speedups.

We hope this is useful to the community!🫶🫶
Learn more:
📖 Blog: https://qwen.ai/blog?id=flashqla
💻 Code: https://github.com/QwenLM/FlashQLA

来源:Qwen · x.com