Minimal Seq2Seq model with attention for neural machine translation in PyTorch.
This implementation focuses on the following features:
- Modular structure to be used in other projects
- Minimal code for readability
- Full utilization of batches and GPU.
- Provide beam-search
This implementation relies on torchtext to minimize dataset management and preprocessing parts.
- Encoder: Bidirectional GRU
- Decoder: GRU with Attention Mechanism
- Attention: Neural Machine Translation by Jointly Learning to Align and Translate
-
conda create new environment refer to file
-
Download tokenizers of English:
python -m spacy download en_core_web_sm
- Remember to modify config file before running
CUDA_VISIBLE_DEVICES=1 python train.py
Based on the following implementations