arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.00576cs.CLcs.AI
收藏

FlashEVA:通过高效注意力加速LLM推理

FlashEVA: Accelerating LLM inference via Efficient Attention

Huawei Technologies(华为技术)

Juan Gabriel Kostelec, Qinghai Guo

AI总结:

本文提出FlashEVA,一种EVA的高效实现,通过微调使Transformer适应FlashEVA注意力,在保持下游任务有效性的同时显著提升推理吞吐量并降低内存使用。

摘要:

Transformer模型彻底改变了自然语言处理,实现了最先进的性能并展现出卓越的可扩展性。然而,它们的内存需求,特别是由于在内存中维护完整上下文,给推理带来了重大挑战。在本文中,我们提出了FlashEVA,这是EVA(Efficient Attention via Control Variates)的高效实现,并展示了如何微调transformer以适应FlashEVA注意力。我们的方法能够对Transformer模型进行微调,仅需1.5B tokens即可在各种下游任务中保持有效性。值得注意的是,与标准Transformer实现相比,FlashEVA在推理过程中实现了高达6.7倍的吞吐量和5倍的更低峰值GPU内存使用。尽管有这些改进,我们观察到在以检索为重点的任务中存在局限性。我们的实现通过可调整的超参数提供了对吞吐量和准确性之间权衡的控制,为各种用例提供了灵活性。这项工作代表了朝着更高效和适应性更强的基于Transformer的推理模型迈出的重要一步。

英文摘要:

Transformer models have revolutionized natural language processing, achieving state-of-the-art performance and demonstrating remarkable scalability. However, their memory demands, particularly due to maintaining full context in memory, pose significant challenges for inference. In this paper, we present FlashEVA, an efficient implementation of EVA (Efficient Attention via Control Variates), and demonstrate how to finetune transformers to adapt to FlashEVA attention. Our method enables fine-tuning of Transformer models with as few as 1.5B tokens while preserving effectiveness across various downstream tasks. Notably, FlashEVA achieves up to 6.7x higher throughput and 5x lower peak GPU memory usage during inference compared to standard Transformer implementations. Despite these improvements, we observe limitations in retrieval-focused tasks. Our implementation offers control over the trade-off between throughput and accuracy through adjustable hyperparameters, providing flexibility for diverse use cases. This work represents a significant step towards more efficient and adaptable Transformer-based models for inference.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑