I think I understand. For training, the decoder input is right shifted from labels whose sequence length
is 7. For inference, the decoder input is a cls token which need to forward several times.
Thank you for your time!