-
Notifications
You must be signed in to change notification settings - Fork 255
Conversation
googlebot
commented
Aug 31, 2020
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.
i️ Googlers: Go here for more info.
a3d42a3 to
7a96222
Compare
googlebot
commented
Aug 31, 2020
CLAs look good, thanks!
i️ Googlers: Go here for more info.
...nsistent with other scores. create a compute_score function to remove duplicate code.
@adarob
adarob
left a comment
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.
Actually, this is going to result in an approximate doubling of inference time. Can you make it so the score is computed in sample_autoregressive?
adarob
commented
Oct 2, 2020
@allen-q do you plan on following up with this? thanks!
allen-q
commented
Oct 6, 2020
via email
adarob
commented
Oct 16, 2020
No worries. Perhaps we can just gate this with a bool arg for now until we have the "free" version?
I am currently working on a return_logits option for sample_autoregressive that just returns the already available logits together with outputs so no extra computation is involved. If this is set to True it returns an (outputs, output_logits) tuple instead of outputs. But I think it makes no sense to return only outputs anymore so not sure another argument should be introduced.
Uh oh!
There was an error while loading. Please reload this page.
Background:
I was using the T5 model and wanted to get the scores at inference mode along with the generated text. However, this feature is not supported by T5 at the moment and I was advised to implement this feature and raise a pull request. Please see google-research/text-to-text-transfer-transformer#311. for more details.
This PR implemented this function to add the scores(log likelihood) along the generated text in the outputs when a model is exported in SavedModel format.
Changed file:
./mesh/mesh_tensorflow/transformer/utils.py
SignatureDef Diff
Below is how a T5 MTF SavedModel SignatureDef looks like before the change:
Below is how a T5 MTF SavedModel SignatureDef looks like after the change: