@Codophile1 I dont think the  transformer model is based on encoder and decoder having different output features
According to the research paper
  

      arxiv.org
  

  
    

1706.03762.pdf

  2.10 MB

  

  
    
    
  

  



In “encoder-decoder attention” layers, the queries come from the previous decoder layer, and the memory keys and values come from the output of the encoder. This allows every position in the decoder to attend over all positions in the input sequence. This mimics the typical encoder-decoder attention mechanisms in sequence-to-sequence models such as [38, 2, 9]

We can see that the attention memory key and values for the decoder come from the encoder. Due to this we need to ensure the same vector space so that the attention K V can also be shared