This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
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.
[RAD] OSS RAG & FiD #3611
[RAD] OSS RAG & FiD #3611
Changes from 6 commits
5db90a4
7b5c17b
4eaab57
3eb78f5
434ffad
7997ab6
8a3a162
5bd6a8a
9d345ff
2d674ed
89c900c
a03d590
3a7a664
10a9648
a1ee8f3
0c04e91
25d7bdd
8306844
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This may be out of the scope of this PR. But I feel like we could eliminate having to override this if encoder_states were a dict or **kwargs instead of a tuple.
In the scope of this PR, you could remove the need for this function by modifying
TransformerGeneratorModel.reorder_encoder_states
to doenc, mask = encoder_states[:2]
.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.
I actually find the forcing nice, as it causes people to realize they need to handle reordering states. kwargs could hide something that isn't being properly shuffled
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.
i should probably clarify this docstring, as we're overriding
RagModel.reorder_encoder_states
, notTGM