π³ Saiko-Trilingual-LSTM
A from-scratch PyTorch Neural Machine Translation (NMT) system for Afaan Oromoo β Amharic β English.
This model was engineered entirely from zero (no pre-trained weights) as part of a Master's thesis at Jimma University.
π Model Details
| Attribute | Value |
|---|---|
| Architecture | Sequence-to-Sequence (Seq2Seq) |
| Encoder | 2-Layer Bidirectional LSTM (256 hidden dim) |
| Attention | Bahdanau Attention (additive) |
| Decoder | 2-Layer Unidirectional LSTM |
| Vocabulary | 50,004 words (Custom tokenizer built from scratch) |
| Output Layer | Linear + Softmax (50,004 classes) |
| Dropout | 0.1 |
| Parameters | ~326 MB checkpoint |
| Framework | 100% Custom PyTorch |
π Training Details
| Attribute | Value |
|---|---|
| Dataset Size | 1,706,118 Trilingual Pairs |
| Data Synthesis | English Pivot Strategy + 1,000+ oversampled conversational phrases |
| Optimizer | Adam (Learning Rate = 0.001) |
| Batch Size | 64 |
| Loss Function | Cross-Entropy Loss (ignoring <pad> tokens) |
| Tricks | Sutskever Reversal, Teacher Forcing (50%), Gradient Clipping (1.0) |
| Hardware | Kaggle T4Γ2 / P100 GPU |
π Supported Languages & Directions
- Afaan Oromoo (
orm) β 8.3M+ speakers - Amharic (
amh) β 32M+ speakers - English (
eng) β Global lingua franca
6 Translation Directions handled by ONE model:
- Oromo β Amharic
- Oromo β English
- Amharic β English
π» Usage
from huggingface_hub import hf_hub_download
import torch
# 1. Download the weights and vocabulary
model_path = hf_hub_download(
repo_id="lwagari/saiko-lstm-model",
filename="lstm_trilingual.pt"
)
vocab_path = hf_hub_download(
repo_id="lwagari/saiko-lstm-model",
filename="vocab_trilingual.pkl"
)
# 2. Load into the custom Seq2Seq architecture
# (See the 'streamlit_app.py' in the GitHub repo for the class definitions)
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support