Yes, that is a diagram of what looks like an RNN but the concepts should be the same. I don’t think you need to feed in SOS and EOS tokens to the encoder in the input, I’m only talking about the target.
The decoder uses the target mask, not the encoder. The encoder and the decoder are two seperate transformers. The target is fed into the decoder for teacher forcing to help train faster, but we need to make sure it can’t just copy the given target to the output so we use a mask to prevent it from looking at the tokens one word ahead. The SOS token offsets the given target from what should be outputted.