Skip to content

Commit

Permalink
Start an article on relative positional embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Jan 15, 2024
1 parent 4bb4c70 commit 01e955c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions _drafts/2024-02-01-relative-positional-embedding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: post
title: Relative positional embedding for any attention mechanism
date: 2024-02-01T08:00:00+01:00
math: true
keywords:
- large language models
- machine learning
- positional embedding
- transformers
---

In [Shaw et al. (2018)], the authors introduce relative positional embedding for
self-attention in transformer models, and in [Huang et al. (2018)], the authors
present an efficient way of calculation this embedding in decoder blocks, in
which the self-attention is causal. In this article, the approach is generalized
to any attention mechanism, should it be self or cross or full or causal.

# References

* Huang et al., “[Music transformer: Generating music with long-term
structure][Huang et al. (2018)],” Google Brain, 2018.
* Shaw et al., “[Self-attention with relative position representations][Shaw et
al. (2018)],” Google Brain, 2018.

[Huang et al. (2018)]: https://arxiv.org/abs/1809.04281
[Shaw et al. (2018)]: https://arxiv.org/abs/1803.02155

0 comments on commit 01e955c

Please sign in to comment.