In many applications of sequence-to-sequence models, at inference time, the output of the decoder at time t is fed back and becomes the input of decoder at time t+1.
during training, it is more common to provide the correct input to the decoder at every time-step even if the decoder made a mistake before, which leads to a discrepancy between how the model is used at training and inference.