Greedy Decoding

Greedy Decoding Formula

y^t=argmaxiPθ(yt=w|y1:t1,X)

How to use in Transformers Library:

greedy_output = model.generate(**model_inputs, max_new_tokens=40)

Related Notes