This is not a general-purpose translator. It's a specialized compression model that maps Ukrainian expressions (2-4 words) to minimal English while preserving meaning for LLM understanding.
Model Details
Parameter
Value
Architecture
GRU Encoder-Decoder with Attention
Parameters
7.3M
Encoder
Bidirectional GRU, hidden=256, embed=128
Decoder
GRU with Bahdanau attention
Source vocab
15,679 tokens (Ukrainian)
Target vocab
9,608 tokens (English)
Dropout
0.0 (inference)
Training pairs
28,149
Validation set
500 pairs
Framework
PyTorch
Performance
Metric
Value
Exact match (val)
98.2%
Word overlap (val)
99.33%
Token savings (full pipeline)
73%
GPT quality preservation
150% (squeezed > original)
Evaluated on 53,351 texts (Telegram corpus + Ukrainian literature). Full pipeline with lexicon + seq2seq achieves 73% token reduction while GPT-4 understands squeezed text better than original Ukrainian (100% vs 67% accuracy on IT prompts).
Training
Data sources:
OPUS parallel corpus (UA-EN): 38K cleaned entries from KDE/GNOME/documentation
Auto-generated expression pairs via LLM: 7.7K entries
Telegram slang/surzhyk: 802 entries
Manual UA→EN mappings: 208 entries
Training configuration:
Optimizer: Adam
Loss: CrossEntropyLoss (ignore padding)
Label smoothing: applied during training
Anti-overfitting: dropout in encoder/decoder during training, smaller model size
LLM token optimization — Ukrainian Cyrillic costs 3-4x more tokens than English. This model is part of a pipeline that saves 73% tokens.
Chatbot preprocessing — Normalize surzhyk/slang before sending to GPT/Claude. Response quality improves from 67% to 100%.
Cost reduction — 10K Ukrainian prompts/day through GPT → 60-73% savings on input token costs.
AI agents — Compress Ukrainian context for longer agent memory. 73% compression = 73% more context window.
Local search & classification — The lexicon.db enables offline Ukrainian text indexing, semantic search, and topic classification without any API calls.
Full Pipeline
mermaid
1graph LR
2 A[UA text]--> B[crack_open<br/>360 rules + pymorphy3]3 B --> C[compress<br/>remove fillers]4 C --> D[seq2seq<br/>this model]5 C --> E[lexicon.db<br/>word-by-word]6 D --> F[EN compressed]7 E --> F
89style A fill:#fdd,stroke:#c3310style F fill:#dfd,stroke:#3a311style D fill:#def,stroke:#38a