How to share encoder and decoder in multilingual transformer enabling bi-directional translation?
❓ Questions and Help
Before asking:
-
search the issues. >> There are issues related with many-to-one where the target is fixed and a dictionary can be shared using the same
--tgt-dict. But no such explaination is found when each language pairs are valid target candidates. -
search the docs. >> The official documentation shows the steps for
{de,fr}->enand not the other way round.
What do you want?
- Train a multiway multilingual translation system using
L1,L2,L3. - Possible train directions
L1->{L2,L3}and{L2,L3}->L1.
What is is your question?
The multilingual example covers the scenario for {L2,L3}->L1 where the --tgt-dict generated from {L2-L1} pair is used by the {L3-L1} pair which enables the decoder sharing.
My question is how to enable the encoder sharing also, as I cannot make a joined dictionary either as there are more than 2 languages?
What have you tried?
I have prepended a target language token to each of the source languages and merged the training data such that I have now a single source and single target language pair following Johnson et al. Then learned a joint dictionary over the merged data. Is this a valid approach?
Code
Not relevant
What's your environment?
Not relevant.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!