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

Add AttentionScorer abstraction #349

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

shadeMe
Copy link
Collaborator

@shadeMe shadeMe commented Oct 4, 2023

Description

This PR abstracts the attention scoring mechanism, adding support for plugging in different implementations such as the disentangled attention component used in DeBERTa.

We also move the Torch SDP code into ScaledDotProductAttention and emit a warning when it's enabled without the correct scorer.

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.

@shadeMe shadeMe added type/feature Type: Feature feat/layers Feature: Layers labels Oct 4, 2023
@danieldk danieldk merged commit 499e9d9 into explosion:main Oct 5, 2023
8 of 9 checks passed
@shadeMe shadeMe deleted the refactor/attention-scorer branch October 5, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/layers Feature: Layers type/feature Type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants