ROFORMER: ENHANCED TRANSFORMER WITH ROTARY POSITION EMBEDDING

date
icon
password
Sub-item
Blocked by
Parent item
type
status
slug
summary
tags
category
Blocking
 
 
 

2. Background and Related Work

2.1 Preliminary

定义Sentence
定义Embedding
 
首先self-attention 转换
通过引入了位置,然后query和key被用来计算attention score。
现在关于位置编码的研究,基本上都是关注与上面

2.2 Absolute position embedding

一个典型的选择就是
就是位置的向量,和维度一致,可相加
原始attention is all you need选择了正弦曲线
t为位置向量的某个维度,d=512时, t=0,1,...,255
有个点需要注意,transformer里是固定的位置编码,算出来的,但是BERT的通过训练得到的
training LLM from scratchBPE、WordPiece、Unigram LM、SentencePiece