bentrevett/multi30k
Viewer • Updated • 31k • 7.41k • 15
A PyTorch Seq2Seq Encoder-Decoder GRU trained from scratch on the Multi30k dataset.
| Split | Samples |
|---|---|
| Train | 29,000 |
| Validation | 1,014 |
| Test | 1,000 |
| Metric | Value |
|---|---|
| Train Loss | 0.87 |
| Validation Loss | 5.19 |
| Test Loss | 3.75 |
| BLEU | 16.06 |
# Load model
model = Seq2Seq(encoder, decoder, device)
model.load_state_dict(
load_file("best_seq2seq_gru.safetensors")
)
model.eval()
# Inference
sentence = "A man is riding a bicycle."
translation = translate_sentence(
sentence,
model
)
print(" ".join(translation))
Author Ankit Bari
GitHub: https://github.com/aijadugar Hugging Face: https://huggingface.co/aijadugar