Generate: How to output scores?
Thedocumentationstates that it is possible to obtain scores withmodel.generateviareturn_dict_in_generate/output_scores.generation_output = model.generate(**inputs, return_dict_in_generate=True, output_scores=True)However, when I add one of these to mymodel.generate, likemodel.generate(input_ids,
     max_length=85,
     num_beams=5,
     output_scores=True,
)it returns the following error:TypeError: forward() got an unexpected keyword argument ‘output_scores’My model is of type,type(model):transformers.models.bart.modeling_bart.BartForConditionalGeneration
2021-04-06T13:14:35Z
Are you sure you are on the latest version of Transformers?
2021-04-07T04:21:21Z
It’s indeed related to the version, I had mistakenly installed version 4.0.0 (viapip install transformers==4). Thank you!