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

feat: positional encoding blog #2483

Merged
merged 7 commits into from
Nov 25, 2024
Merged

feat: positional encoding blog #2483

merged 7 commits into from
Nov 25, 2024

Conversation

FL33TW00D
Copy link
Contributor

Congratulations! You've made it this far! Once merged, the article will appear at https://huggingface.co/blog. Official articles
require additional reviews. Alternatively, you can write a community article following the process here.

Preparing the Article

You're not quite done yet, though. Please make sure to follow this process (as documented here):

  • Add an entry to _blog.yml.
  • Add a thumbnail. There are no requirements here, but there is a template if it's helpful.
  • [?] Check you use a short title and blog path.
  • Upload any additional assets (such as images) to the Documentation Images repo. This is to reduce bloat in the GitHub base repo when cloning and pulling. Try to have small images to avoid a slow or expensive user experience.
  • Add metadata (such as authors) to your md file. You can also specify guest or org for the authors.
  • Ensure the publication date is correct.
  • Preview the content. A quick way is to paste the markdown content in https://huggingface.co/new-blog. Do not click publish, this is just a way to do an early check.

Here is an example of a complete PR: #2382

Getting a Review

Please make sure to get a review from someone on your team or a co-author.
Once this is done and once all the steps above are completed, you should be able to merge.
There is no need for additional reviews if you and your co-authors are happy and meet all of the above.

Feel free to add @pcuenca as a reviewer if you want a final check. Keep in mind he'll be biased toward light reviews
(e.g., check for proper metadata) rather than content reviews unless explicitly asked.

@FL33TW00D
Copy link
Contributor Author

Right now links are to my personal site, will change over to the documentation-images link when the PR is merged there (https://huggingface.co/datasets/huggingface/documentation-images/discussions/396)

_blog.yml Outdated Show resolved Hide resolved
_blog.yml Show resolved Hide resolved
you-could-have-designed-SOTA-positional-encoding.md Outdated Show resolved Hide resolved
you-could-have-designed-SOTA-positional-encoding.md Outdated Show resolved Hide resolved
_blog.yml Outdated Show resolved Hide resolved
@FL33TW00D FL33TW00D marked this pull request as ready for review November 25, 2024 13:15
Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

designing-positional-encoding.md Outdated Show resolved Hide resolved
As we can see, without any positional information, the output of a (multi
headed) self attention operation is **identical for the same token in
different positions**, despite the tokens clearly representing distinct entities. Let's begin designing a method of enhancing self attention with positional information, such that it can determine relationships between words encoded by
their positions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. I wonder if we should compare it with the actual embeddings from the model (with positional embedding applied) to show they are different, but it's probably not necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to do this, but I wanted to keep the code samples as short as possible. If you're happy I'll leave it for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

designing-positional-encoding.md Outdated Show resolved Hide resolved
designing-positional-encoding.md Show resolved Hide resolved
designing-positional-encoding.md Show resolved Hide resolved
designing-positional-encoding.md Show resolved Hide resolved
designing-positional-encoding.md Outdated Show resolved Hide resolved
designing-positional-encoding.md Outdated Show resolved Hide resolved
@FL33TW00D FL33TW00D merged commit f7a37e4 into main Nov 25, 2024
1 check passed
@FL33TW00D FL33TW00D deleted the feature/positional-encoding branch November 25, 2024 16:36
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

Successfully merging this pull request may close these issues.

2 participants