Training script for BERT-fused Neural Machine Translation (NMT)
Top 78.7% on sourcepulse
This repository provides code for BERT-fused Neural Machine Translation (NMT), enhancing translation quality by integrating BERT embeddings. It's targeted at researchers and practitioners in NLP and machine translation looking to leverage large pre-trained language models for improved NMT performance.
How It Works
The approach fuses BERT embeddings into a standard Transformer NMT architecture. BERT's contextual representations are incorporated, likely as initial encoder states or through attention mechanisms, allowing the NMT model to benefit from BERT's deep linguistic understanding. This fusion aims to capture richer semantic information than traditional NMT models, leading to more accurate translations.
Quick Start & Requirements
pip install --editable .
after cloning the repository.prepare-xxx.sh
and a custom makedataforbert.sh
script.Highlighted Details
bert-base-german-dbmdz-uncased
.--warmup-from-nmt
).--encoder-bert-dropout
) for regularization.transformers
library for various BERT models.Maintenance & Community
The project is associated with the ICLR 2020 paper "Incorporating BERT into Neural Machine Translation." No specific community channels or active maintenance signals are evident from the README.
Licensing & Compatibility
The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The code requires specific older versions of PyTorch (1.0.0/1.1.0), which may pose compatibility challenges with current environments. The data preparation steps involve custom scripts beyond standard Fairseq.
2 years ago
1 day