Peng-Jen Chen

Results comments of Peng-Jen Chen

We added `--decoder-langtok` supports in #620. You can specify `--decoder-langtok` in both training and inference. It feeds the target language token as the first token to decoder.

@madaanpulkit sure, I have some draft example about how to train a many-to-many multilingual translation model, but I need to clean it up a bit. I will update the example...

Here is an example that uses the binarized data from the multilingual example. Here I just demonstrate how to specify the command line correctly without tuning the hyper-parameters: Training: ```...

I have experimented both `--encoder-langtok tgt` and `--docoder-langtok` on many-to-many case, but I didn't find any difference. I use `--encoder-langtok tgt` as example is just because the [original paper](https://www.aclweb.org/anthology/Q17-1024) suggested...

Thanks for reporting the error. This is a bug, and I will fix the problem shortly.

[edited the inline code] The fix is still under review. To unblock you, here is the workaround: Replace the [code](https://github.com/pytorch/fairseq/blob/184629a721adf84a4fbd1fd5db8306c49da7685d/fairseq/tasks/multilingual_translation.py#L87-L100) with the following: ``` args.lang_pairs = args.lang_pairs.split(',') if args.source_lang is...

sorry, I changed the workaround above and we need one more change. Change [this line](https://github.com/fairinternal/fairseq-py/blob/02ec1bba2fe6dc5ee32fa8e1ca268fae0f61bdbf/fairseq/tasks/multilingual_translation.py#L168) to the following: `eval_key=None if self.training else "%s-%s" % (self.args.source_lang, self.args.target_lang),`

ah, sorry. for that we need another patch: change [this](https://github.com/pytorch/fairseq/blob/829bd8ce5fc336991c828f178ac5f231250ef77d/interactive.py#L46) to ``` dataset=task.build_dataset(tokens, lengths, task.source_dictionary) \ if 'build_dataset' in dir(task) else \ data.LanguagePairDataset(tokens, lengths, task.source_dictionary), ``` and add this function...

The fix is merged into master [1]. Please pull the latest version. After the fix, we don't need to specify `--lang-pairs` during inference time anymore. [1] https://github.com/pytorch/fairseq/pull/505

Sorry, the PR is not in master yet. I will keep the issue open until the merge happens.