This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 211
[1/2] Use any task as an embedder for any layer #1396
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ethanwharris
requested review from
Borda,
tchaton,
justusschock,
krshrimali and
kaushikb11
as code owners
July 15, 2022 17:46
ethanwharris
changed the title
[POC] Use any task as an embedder for any layer
[PoC] Use any task as an embedder for any layer
Jul 15, 2022
Codecov Report
@@ Coverage Diff @@
## master #1396 +/- ##
==========================================
- Coverage 92.91% 92.90% -0.02%
==========================================
Files 285 286 +1
Lines 12778 12836 +58
==========================================
+ Hits 11873 11925 +52
- Misses 905 911 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
krshrimali
reviewed
Jul 16, 2022
Co-authored-by: Kushashwa Ravi Shrimali <[email protected]>
for more information, see https://pre-commit.ci
justusschock
approved these changes
Jul 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ning/lightning-flash into feature/as_embedder
otaj
approved these changes
Jul 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
ethanwharris
changed the title
[PoC] Use any task as an embedder for any layer
[1/2] Use any task as an embedder for any layer
Jul 18, 2022
krshrimali
approved these changes
Jul 18, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds support for calling
as_embedder
on any task to convert it to an embedder. The embeddings retain gradient information so they could be used for training the model weights.This approach uses an exception to break out of the forward in intermediate layers to avoid excess computation.
Still to come in follow-up: docs
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃