Downloads · 30 days
5
9% of all-time downloads
aijadugar/multi30k-lstm
multi30k-lstm is a translation model from aijadugar. Use it when you need text moved from one language to another. It is set up for pytorch. The card lists the license as mit.
A PyTorch Seq2Seq Encoder-Decoder LSTM trained from scratch on the Multi30k dataset.
Downloads · 30 days
5
9% of all-time downloads
All-time downloads
57
Public
Repo size
36.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors18.2 MB · 99%
From the Hugging Face model README
A PyTorch Seq2Seq Encoder-Decoder LSTM trained from scratch on the Multi30k dataset.
| Split | Samples |
|---|---|
| Train | 29,000 |
| Validation | 1,014 |
| Test | 1,000 |
| Metric | Value |
|---|---|
| Train Loss | 0.62 |
| Validation Loss | 5.55 |
| Test Loss | 3.79 |
| BLEU | 14.70 |

# Load model
model = Seq2Seq(encoder, decoder, device)
model.load_state_dict(
load_file("best_seq2seq_lstm.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