Hi you can use the new diverse beam generation easily by just adding the two new parameters into generate().
Two new parameters on diverse beam are num_beam_group and diversity_penalty where  num_beam_group <= num_beams
Example
outputs = model.generate(input_ids, min_length=1, max_length=200,
                                  no_repeat_ngram_size=3, num_beams=5, early_stopping=True,
                                  do_sample=False, num_return_sequences=5,
                                  num_beam_groups=5, diversity_penalty=2.0
                                 )