tgt is the target input, in the training you need tgt input as golden truth to do teacher forcing learning, but in the inference, you don’t need tgt, you only need to input the encoded_vector from encoder and the first token in the tgt, usually it’s BOS.