Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pcyin/pytorch_nmt
A neural machine translation model in PyTorch
https://github.com/pcyin/pytorch_nmt
deep-learning machine-learning neural-machine-translation pytorch
Last synced: about 1 month ago
JSON representation
A neural machine translation model in PyTorch
- Host: GitHub
- URL: https://github.com/pcyin/pytorch_nmt
- Owner: pcyin
- Created: 2017-04-11T18:51:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-03T20:11:21.000Z (over 5 years ago)
- Last Synced: 2024-11-16T04:10:58.377Z (about 2 months ago)
- Topics: deep-learning, machine-learning, neural-machine-translation, pytorch
- Language: Python
- Homepage:
- Size: 16.5 MB
- Stars: 118
- Watchers: 7
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**A neural machine translation model written in pytorch.**
**For a up-to-date PyTorch implementation of basic vanilla attentional NMT, please refer to [this repo](https://github.com/pcyin/pytorch_basic_nmt)**
With 256-dimensional LSTM hidden size, it achieves a training speed of 14000 words/sec and 26.9 BLEU score on the IWSLT 2014 Germen-English dataset (Ranzato et al., 2015).
## File Structure
* `nmt.py`: main file
* `vocab.py`: script used to generate `.bin` vocabulary file from parallel corpus
* `util.py`: script containing helper functions
* `run_raml_exp.py|test_raml_models.py`: helper scripts to train|test RAML models with different temperature settings (refer to [Norouzi et al., 2016] for details)## Usage
* Generate Vocabulary Files
```
python vocab.py
```* Vanilla Maximum Likelihood Training
```
. scripts/run_mle.sh
```* Reward Augmented Maximum Likelihood Training (Norouzi et al., 2016)
```
. scripts/run_raml.sh
```* Reinforcement Learning (Coming soon)
## TODO:
* batched decoding as in openNMT
## License
This work is licensed under a Creative Commons Attribution 4.0 International License.