while at inference the entire sequence is generated by the resulting model on its own and hence the previous words generated by the model are fed as context.
the predicted words at training and inference are drawn from different distributions, namely, from the data distribution as opposed to the model distribution.