This commit is contained in:
Patrick von Platen 2020-03-10 20:24:26 +01:00
parent 7351a8dbaf
commit d997ac7810
1 changed files with 1 additions and 1 deletions

View File

@ -1281,7 +1281,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin):
if self.config.is_encoder_decoder:
# do not return first <EOS> token
return decoded[:, 1:]
# return decoded
return decoded
# force one of token_ids to be generated by setting prob of all other tokens to 0.
def _force_token_ids_generation(self, scores, token_ids):