Sinusoidal Positional Encoding
An absolute positional encoding method requiring no trained parameters that uses sine and cosine functions of different frequencies to generate a unique encoding vector for each position. It can in theory represent sequences of arbitrary length, but its extrapolation capability is limited.
Timeline (last 90 days)
Qwen2.5-VL uses a two-dimensionally interpolated sinusoidal positional encoding, generating encodings separately in the width and height directions and adding them.
Standard learnable positional encodings have a fixed length and cannot be used directly when the input length varies; although sinusoidal positional encodings can extrapolate, the meaning of their frequencies becomes misaligned when the sampling rate changes.
The sinusoidal positional encoding formulas are PE(pos, 2i) = sin(pos/10000^(2i/d_model)) and PE(pos, 2i+1) = cos(pos/10000^(2i/d_model)).
In sinusoidal positional encoding, low dimensions (small i) have short wavelengths and change quickly, while high dimensions (large i) have long wavelengths and change slowly.
All Facts (4)
Qwen2.5-VL uses a two-dimensionally interpolated sinusoidal positional encoding, generating encodings separately in the width and height directions and adding them.
50%UnverifiedStandard learnable positional encodings have a fixed length and cannot be used directly when the input length varies; although sinusoidal positional encodings can extrapolate, the meaning of their frequencies becomes misaligned when the sampling rate changes.
50%UnverifiedThe sinusoidal positional encoding formulas are PE(pos, 2i) = sin(pos/10000^(2i/d_model)) and PE(pos, 2i+1) = cos(pos/10000^(2i/d_model)).
50%UnverifiedIn sinusoidal positional encoding, low dimensions (small i) have short wavelengths and change quickly, while high dimensions (large i) have long wavelengths and change slowly.
50%