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

Does Prefix Tuning support T5 later? #20

Closed
fade-color opened this issue Oct 20, 2021 · 2 comments
Closed

Does Prefix Tuning support T5 later? #20

fade-color opened this issue Oct 20, 2021 · 2 comments

Comments

@fade-color
Copy link

fade-color commented Oct 20, 2021

I saw T5's source code doens't support adding past_key_values ​​to the encoder in their code base. in

class PrefixTuningTemplate(Template):
r"""This template different from most template in that this emplate doesn't need to
wrap the input sentences with the template. The new tokens are always prepended to
the language model. A mapping is used to map the new_tokens embeddings in to the
past_key_value, and then input into the language model. The mask token of this
template is automatically the last token. Currently, our implementation of
prefix_tuning doens't support adding past_key_values to the encoder side of an
encoder_decoder architecture such as T5 without modifying the T5 source code.
(T5's source code doens't support adding past_key_values to the encoder in their code base. )
, Does this show that the prefix tuning is not compatible with T5? Will T5 will be supported later? thanks.

@fade-color fade-color changed the title Does Prefix Tuning support T5? Does Prefix Tuning support T5 later? Oct 20, 2021
@ningding97
Copy link
Member

I saw T5's source code doens't support adding past_key_values ​​to the encoder in their code base. in

class PrefixTuningTemplate(Template):
r"""This template different from most template in that this emplate doesn't need to
wrap the input sentences with the template. The new tokens are always prepended to
the language model. A mapping is used to map the new_tokens embeddings in to the
past_key_value, and then input into the language model. The mask token of this
template is automatically the last token. Currently, our implementation of
prefix_tuning doens't support adding past_key_values to the encoder side of an
encoder_decoder architecture such as T5 without modifying the T5 source code.
(T5's source code doens't support adding past_key_values to the encoder in their code base. )

, Does this show that the prefix tuning is not compatible with T5? Will T5 will be supported later? thanks.

Hi, yes, we are working on it.

@ShengdingHu
Copy link
Collaborator

It has been fixed, see #27

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

3 participants