These decoders generate tokens from left to right, at each step giving a distribution over possible next tokens, conditioned on both the input and all the tokens generated so far.
since the space of all possible output sequences is infinite and grows exponentially with sequence length, heuristic search methods such as greedy decod-ing or beam search (Graves, 2012;Boulanger-Lewandowski et al., 2013) must be used at decoding time to select high-probability output sequences.