Ring Attention with Blockwise Transformers for Near-Infinite Context

变压器 计算 计算机科学 前馈 推论 强化学习 数字用户线 建筑 计算机工程 人工智能 理论计算机科学 算法 计算机网络 工程类 电气工程 控制工程 艺术 电压 视觉艺术
作者
Hao Liu,Matei Zaharia,Pieter Abbeel
出处
期刊:Cornell University - arXiv 被引量:2
标识
DOI:10.48550/arxiv.2310.01889
摘要

Transformers have emerged as the architecture of choice for many state-of-the-art AI models, showcasing exceptional performance across a wide range of AI applications. However, the memory demands imposed by Transformers limit their ability to handle long sequences, thereby posing challenges in utilizing videos, actions, and other long-form sequences and modalities in complex environments. We present a novel approach, Ring Attention with Blockwise Transformers (Ring Attention), which leverages blockwise computation of self-attention and feedforward to distribute long sequences across multiple devices while fully overlapping the communication of key-value blocks with the computation of blockwise attention. Our approach enables training and inference of sequences that are up to device count times longer than those achievable by prior memory-efficient Transformers, without resorting to approximations or incurring additional communication and computation overheads. Extensive experiments on language modeling and reinforcement learning tasks demonstrate the effectiveness of our approach in allowing millions of tokens context size and improving performance.

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
xiha西希完成签到,获得积分10
1秒前
万能图书馆应助灵巧的穆采纳,获得10
2秒前
东风压倒西风完成签到,获得积分10
3秒前
顾矜应助hbhbj采纳,获得10
4秒前
情怀应助张航天采纳,获得10
4秒前
6秒前
创不可贴完成签到,获得积分10
7秒前
生动灵萱完成签到,获得积分10
7秒前
8秒前
过时的花卷完成签到,获得积分10
8秒前
一支桃桃发布了新的文献求助10
9秒前
标致凡儿完成签到 ,获得积分10
10秒前
天天快乐应助zhuyuxin采纳,获得10
10秒前
华仔应助陌上之心采纳,获得10
11秒前
飘逸百褶裙完成签到,获得积分20
16秒前
补药学习发布了新的文献求助10
17秒前
proteinpurify完成签到,获得积分10
18秒前
18秒前
宁人完成签到,获得积分20
20秒前
21秒前
vera完成签到,获得积分10
22秒前
23秒前
02发布了新的文献求助10
24秒前
宁人发布了新的文献求助10
24秒前
量子星尘发布了新的文献求助10
24秒前
24秒前
25秒前
25秒前
Ly完成签到,获得积分20
25秒前
简单花花发布了新的文献求助10
26秒前
科研通AI6应助美好凝莲采纳,获得30
26秒前
泡泡完成签到 ,获得积分10
26秒前
ASHES发布了新的文献求助10
28秒前
小二郎应助vincent采纳,获得10
29秒前
嗡嗡嗡完成签到,获得积分10
29秒前
Ly发布了新的文献求助10
30秒前
儒雅的雁山完成签到 ,获得积分10
33秒前
33秒前
无花果应助马里奥采纳,获得10
33秒前
Booiys完成签到,获得积分10
34秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
List of 1,091 Public Pension Profiles by Region 1581
Encyclopedia of Agriculture and Food Systems Third Edition 1500
Specialist Periodical Reports - Organometallic Chemistry Organometallic Chemistry: Volume 46 1000
Current Trends in Drug Discovery, Development and Delivery (CTD4-2022) 800
The Scope of Slavic Aspect 600
Foregrounding Marking Shift in Sundanese Written Narrative Segments 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 纳米技术 计算机科学 内科学 化学工程 复合材料 物理化学 基因 遗传学 催化作用 冶金 量子力学 光电子学
热门帖子
关注 科研通微信公众号,转发送积分 5530788
求助须知:如何正确求助?哪些是违规求助? 4619762
关于积分的说明 14570057
捐赠科研通 4559290
什么是DOI,文献DOI怎么找? 2498318
邀请新用户注册赠送积分活动 1478269
关于科研通互助平台的介绍 1449838