Downloads · 30 days
2
2% of all-time downloads
may-ohta/iwslt14_prompt
iwslt14_prompt is a machine learning model from may-ohta. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for JoeyNMT. The card lists the license as apache-2.0.
This is a JoeyNMT model for multilingual MT with language tags, built for a demo purpose. The model is trained on iwslt14 de-en / en-fr parallel data using DDP.
Downloads · 30 days
2
2% of all-time downloads
All-time downloads
127
Public
Repo size
2.8 GB
Likes
0
Public
Click a slice to open those files.
.ckpt2.8 GB · 100%
From the Hugging Face model README
This is a JoeyNMT model for multilingual MT with language tags, built for a demo purpose. The model is trained on iwslt14 de-en / en-fr parallel data using DDP.
Install JoeyNMT v2.3:
$ pip install git+https://github.com/joeynmt/joeynmt.git
Torch hub interface:
import torch
iwslt14 = torch.hub.load("joeynmt/joeynmt", "iwslt14_prompt")
translation = iwslt14.translate(
src=["Hello world!"], # src sentence
src_prompt=["<en>"], # src language code
trg_prompt=["<de>"], # trg language code
beam_size=1,
)
print(translation) # ["Hallo Welt!"]
(See jupyter notebook for details)
$ python -m joeynmt train iwslt14_prompt/config.yaml --use-ddp --skip-test
(See train.log for details)
$ git clone https://huggingface.co/may-ohta/iwslt14_prompt
$ python -m joeynmt test iwslt14_prompt/config.yaml --output-path iwslt14_prompt/hyp
| direction | bleu |
|---|---|
| en->de | 28.88 |
| de->en | 35.28 |
| en->fr | 38.86 |
| fr->en | 40.35 |
nrefs:1|case:lc|eff:no|tok:13a|smooth:exp|version:2.4.0(See test.log for details)
We downloaded IWSLT14 de-en and en-fr from https://wit3.fbk.eu/2014-01 and created {train|dev|test}.tsv files in the following format:
| src_prompt | src | trg_prompt | trg |
|---|---|---|---|
<en> | Hello. | <de> | Hallo. |
<de> | Vielen Dank! | <en> | Thank you! |
(See test.ref.de-en.tsv)