Lightning Attention-2 是一种新型的线性注意力机制,让长序列的训练和推理成本与 1K 序列长度的一致。
图 1
论文:Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Models 论文地址:https://arxiv.org/pdf/2401.04658.pdf 开源地址:https://github.com/OpenNLPLab/lightning-attention