LogitsProcessor vs LogitsWarper

What is the intended difference between the transformers.LogitsProcessor and transformers.LogitsWarper classes?

Hey @dpaleka :wave: .generate() maintainer here. The two classes are very similar – the biggest distinction would be that transformers.LogitsWarper are only used with sampling strategies (i.e. when you pass do_sample=True).

1 Like