wmt/wmt14
Viewer • Updated • 47.8M • 10.2k • 39
A PyTorch encoder–decoder Transformer based on Attention Is All You Need.
Blog · Project repository · Demo
Read Building a German-to-English Transformer in PyTorch: Experiments and Inference Optimizations for the experiments and inference optimizations.
Both models translate German into English. The WMT14 model was trained on the German–English training split of WMT14, and the IWSLT17 model was trained on the corresponding IWSLT17 training split. Each model used its dataset's validation split for validation.
model.pt), configuration (config.json), and matching SentencePiece tokenizer (bpe.model) from the Hugging Face model repository for the model you want to use. Place the weights and configuration together in a directory inside the repository, such as checkpoints/wmt14/.train.py, set save_file_path_root to that directory (for example, "./checkpoints/wmt14"). Update the top-level model_path entry in the downloaded config.json to point to the local weights file (for example, "./checkpoints/wmt14/model.pt").bpe.model in tokenizers/<tokenizer_source>/, using the tokenizer_source value from the downloaded configuration (wmt14 or iwslt17).evaluation.ipynb from the repository root and run its model-loading and decoding cells to try translations and evaluate the model.