RoFormer: Enhanced transformer with Rotary Position Embedding

嵌入 计算机科学 变压器 绳子 杠杆(统计) 安全性令牌 人工智能 算法 工程类 电气工程 计算机安全 电压
作者
Jianlin Su,Murtadha Ahmed,Yu Lu,Shengfeng Pan,Bo Wen,Yunfeng Liu
出处
期刊:Neurocomputing [Elsevier BV]
卷期号:568: 127063-127063 被引量:395
标识
DOI:10.1016/j.neucom.2023.127063
摘要

Position encoding has recently been shown to be effective in transformer architecture. It enables valuable supervision for dependency modeling between elements at different positions of the sequence. In this paper, we first investigate various methods to integrate positional information into the learning process of transformer-based language models. Then, we propose a novel method named Rotary Position Embedding (RoPE) to effectively leverage the positional information. Specifically, the proposed RoPE encodes the absolute position with a rotation matrix and meanwhile incorporates the explicit relative position dependency in the self-attention formulation. Notably, RoPE enables valuable properties, including the flexibility of sequence length, decaying inter-token dependency with increasing relative distances, and the capability of equipping linear self-attention with relative position encoding. Finally, we evaluate the enhanced transformer with rotary position embedding, also called RoFormer, on various long text classification benchmark datasets. Our experiments show that it consistently overcomes its alternatives. Furthermore, we provide a theoretical analysis to explain some experimental results. RoFormer is already integrated into Huggingface: https://huggingface.co/docs/transformers/model_doc/roformer.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
张润泽发布了新的文献求助30
刚刚
123完成签到,获得积分10
1秒前
yw发布了新的文献求助10
1秒前
冷酷的啤酒完成签到,获得积分10
1秒前
1秒前
金色天际线完成签到,获得积分10
2秒前
ccCherub完成签到,获得积分10
2秒前
WX完成签到 ,获得积分10
2秒前
Inter09完成签到,获得积分10
3秒前
半夏完成签到,获得积分10
3秒前
123发布了新的文献求助10
3秒前
一路向北4956完成签到,获得积分10
4秒前
Cynthia应助陈椅子的求学采纳,获得10
4秒前
MM完成签到,获得积分10
4秒前
打打应助VIP采纳,获得10
5秒前
慕青应助myg123采纳,获得10
5秒前
豆子完成签到,获得积分10
6秒前
彩色的蓝天完成签到,获得积分10
6秒前
kanoz完成签到 ,获得积分10
7秒前
匀升完成签到,获得积分10
7秒前
eno完成签到,获得积分10
7秒前
情怀应助MM采纳,获得10
8秒前
平常天佑完成签到,获得积分10
8秒前
9秒前
9秒前
棠棠完成签到 ,获得积分10
10秒前
花花完成签到,获得积分10
10秒前
风的味道完成签到,获得积分10
10秒前
LW完成签到,获得积分10
10秒前
LJJ完成签到,获得积分10
10秒前
香蕉子骞完成签到 ,获得积分10
10秒前
周清素完成签到,获得积分10
11秒前
11秒前
青易完成签到,获得积分10
11秒前
尊敬的小土豆完成签到,获得积分10
11秒前
kingwill应助小王同志采纳,获得20
11秒前
12秒前
饿了就次爪爪完成签到 ,获得积分10
13秒前
13秒前
violet完成签到,获得积分10
14秒前
高分求助中
Les Mantodea de Guyane Insecta, Polyneoptera 2500
Technologies supporting mass customization of apparel: A pilot project 450
A Field Guide to the Amphibians and Reptiles of Madagascar - Frank Glaw and Miguel Vences - 3rd Edition 400
Brain and Heart The Triumphs and Struggles of a Pediatric Neurosurgeon 400
Cybersecurity Blueprint – Transitioning to Tech 400
Mixing the elements of mass customisation 400
Периодизация спортивной тренировки. Общая теория и её практическое применение 310
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3784903
求助须知:如何正确求助?哪些是违规求助? 3330232
关于积分的说明 10245019
捐赠科研通 3045573
什么是DOI,文献DOI怎么找? 1671716
邀请新用户注册赠送积分活动 800646
科研通“疑难数据库(出版商)”最低求助积分说明 759577