Using input tokens in the output in seq2seq models

I’m working on a seq2seq model to translate English commands to a special kind of register commands.
The problem is each register has it’s own unique name and I don’t have the list of all the name in advance. the thing is the register’s name is always mentioned in the english command so if there was a way to copy the input token to the output I could solve the problem.
also here is the gist of my forward function.