Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Positional Encoding is not using sin / cos? #551

Open
mw66 opened this issue Sep 5, 2024 · 1 comment
Open

The Positional Encoding is not using sin / cos? #551

mw66 opened this issue Sep 5, 2024 · 1 comment

Comments

@mw66
Copy link

mw66 commented Sep 5, 2024

pos_emb = self.transformer.wpe(pos) # position embeddings of shape (t, n_embd)

E.g compared with the section Positional Encoding of the following article:

http://jalammar.github.io/illustrated-transformer/

So, did I miss something?

Is this an overlook, or simplification? And how does this affect the training result?

Anyone can help explain?

Thanks.

@jhauret
Copy link

jhauret commented Oct 4, 2024

From GPT-1 paper:

We used learned position embeddings instead of the sinusoidal version proposed in the original work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants