paper-with-me

Papers

KERPLE: Kernelized Relative Positional Embedding for Length Extrapolation

2022-05-20 · Ta-Chung Chi, Ting-Han Fan, Peter J. Ramadge, Alexander I. Rudnicky

Relative positional embeddings (RPE) have received considerable attention since RPEs effectively model the relative distance among tokens and enable length extrapolation. We propose KERPLE, a framework that generalizes relative position embedding for extrapolation by kernelizing positional differences. We achieve this goal using conditionally positive definite (CPD) kernels, a class of functions known for generalizing distance metrics. To maintain the inner product interpretation of self-attention, we show that a CPD kernel can be transformed into a PD kernel by adding a constant offset. This offset is implicitly absorbed in the Softmax normalization during self-attention. The diversity of CPD kernels allows us to derive various RPEs that enable length extrapolation in a principled way. Experiments demonstrate that the logarithmic variant achieves excellent extrapolation performance on three large language modeling datasets. Our implementation and pretrained checkpoints are released at~\url{https://github.com/chijames/KERPLE.git}.

📄 PDF Abstract BibTeX arXiv:2205.09921

Code (2)

chijames/kerple 공식 구현 pytorch
eleutherai/gpt-neox 공식 구현 pytorch

Tasks

DiversityLanguage ModelingLanguage ModellingPosition

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysis

2022-12-20 · Ta-Chung Chi, Ting-Han Fan, Alexander I. Rudnicky, Peter J. Ramadge

Length extrapolation permits training a transformer language model on short sequences that preserves perplexities when tested on substantially longer sequences. A relative positional embedding design, ALiBi, has had the …

Language ModelingLanguage Modelling

An Empirical Study on the Impact of Positional Encoding in Transformer-based Monaural Speech Enhancement

2024-01-18 · Qiquan Zhang, Meng Ge, Hongxu Zhu, Eliathamby Ambikairajah 외

Transformer architecture has enabled recent progress in speech enhancement. Since Transformers are position-agostic, positional encoding is the de facto standard component used to enable Transformers to distinguish the o…

POSPositionSpeech Enhancement

Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encoding

2021-06-23 · NeurIPS 2021 12 · Shengjie Luo, Shanda Li, Tianle Cai, Di He 외

The attention module, which is a crucial component in Transformer, cannot scale efficiently to long sequences due to its quadratic complexity. Many works focus on approximating the dot-then-exponentiate softmax function …

Functional Interpolation for Relative Positions Improves Long Context Transformers

2023-10-06 · Shanda Li, Chong You, Guru Guruganesh, Joshua Ainslie 외

Preventing the performance decay of Transformers on inputs longer than those used for training has been an important challenge in extending the context length of these models. Though the Transformer architecture has fund…

Language ModelingLanguage ModellingPosition

CAPE: Encoding Relative Positions with Continuous Augmented Positional Embeddings

2021-06-06 · NeurIPS 2021 12 · Tatiana Likhomanenko, Qiantong Xu, Gabriel Synnaeve, Ronan Collobert 외

Without positional information, attention-based Transformer neural networks are permutation-invariant. Absolute or relative positional embeddings are the most popular ways to feed Transformer models with positional infor…

Machine Translationspeech-recognitionSpeech RecognitionTranslation