The documentation 3 states that it is possible to obtain scores with model.generate via return_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 my model.generate, like
model.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