Hey @mengyahu - this sounds like a cool use case! You are right we the current generate()
method it is not really possible to avoid repetitions between sentences. It’s quite a special case so I’d suggest that after this PR is merged: Big `generate()` refactor you to make a fork of the transformers
repo and try to tweak the beam_scorer.update()
function (or the BeamSearchScorer
class in general to add a penalty as needed).
1 Like