In this script: https://github.com/rafikg/transformers/blob/master/examples/pytorch/summarization/run_summarization.py
In the line 662
, I added num_return_sequences=2
param of generate()
method but the model is still returning only one sequence instead of 2! I want to add no_repeat_ngram_size=2
, early stopping=True
, etc like in
generate(tokenized_input.input_ids,
max_length=64,
no_repeat_ngram_size=2,
early_stopping=True,
num_beams=4,
num_return_sequences=2)
How we can fix it ?