sentence-transformers/parallel-sentences-tatoeba
Viewer • Updated • 8.35M • 2.57k
A compact (~11.5M parameters) encoder-decoder Transformer trained from scratch in PyTorch for English-to-Polish machine translation, created for the Deep Learning (Uczenie Głębokie) laboratory course at Poznan University of Technology.
| Parameter | Value |
|---|---|
| Architecture | Pre-LN Encoder-Decoder Transformer |
| Parameters | 11,468,608 (~11.5M) |
| Encoder / Decoder layers | 4 / 4 |
d_model |
256 |
d_ff |
1024 |
num_heads |
4 (head_dim = 64) |
| Activation | GELU |
| Positional encoding | Sinusoidal (base = 1000.0, max_len = 96) |
| Dropout | 0.1 |
| Weight tying | Shared tgt_embed.weight and output projection |
| Tokenizers | Separate SentencePiece Unigram (8,000 EN / 8,000 PL) |
en-pl pairs (~348k sentences before filtering to <= 96 tokens) from:
seed = 42).AdamW (lr = 1e-3, betas = (0.9, 0.98), weight_decay = 0.01) with OneCycleLR (pct_start = 0.1, div_factor = 10, final_div_factor = 1), trained for 40 epochs (batch_size = 256, length-bucketed batching, FP16 AMP).label_smoothing = 0.1 and SentencePiece subword regularization (enable_sampling = True, alpha = 0.5).best_model.pth — PyTorch state_dict of the best validation checkpoint.en_combined.model — Source (English) SentencePiece tokenizer (8k unigram).pl_combined.model — Target (Polish) SentencePiece tokenizer (8k unigram).This model is intended exclusively for educational and research purposes (demonstrating self-attention, cross-attention visualization, and Transformer training dynamics). Because it is small (~11.5M parameters) and trained on short Tatoeba/TED sentences (<= 96 tokens), it is not suitable for production translation or long documents.
Released under CC-BY-NC-4.0.