Downloads · 30 days
3
15% of all-time downloads
N1K0L0Z/vanilla-transformer-georgian-english
vanilla-transformer-georgian-english is a translation model from N1K0L0Z. Use it when you need text moved from one language to another. The card lists the license as mit.
A bidirectional Georgian ↔ English neural machine translation model, built by implementing the "Attention Is All You Need" (Vaswani et al., 2017) Transformer architecture from first principles in PyTorch — no torch.nn…
Downloads · 30 days
3
15% of all-time downloads
All-time downloads
20
Public
Repo size
2.3 GB
Likes
0
Public
Click a slice to open those files.
.pt2.3 GB · 100%
From the Hugging Face model README
A bidirectional Georgian ↔ English neural machine translation model, built by implementing the
"Attention Is All You Need" (Vaswani et al., 2017)
Transformer architecture from first principles in PyTorch — no torch.nn.TransformerEncoder,
no pretrained weights, no HuggingFace model classes.
Trained entirely from random initialization for educational purposes: a faithful reproduction of the original 2017 Transformer, with two small, deliberate modern departures (GELU activation, pre-LayerNorm) for training stability.
2en / 2ka)
and shared encoder-decoder parameters — not two separate modelsDarsala/english_georgian_corporaScored with COMET (wmt22-comet-da) on a held-out test
split, greedy decoding:
| Direction | COMET |
|---|---|
| Georgian → English | 0.58 |
| English → Georgian | 0.54 |
Scores in this range reflect moderate translation quality — reliable on common, everyday sentence structures, with an expected drop-off on rare vocabulary and specialized domains, given the model was trained entirely from scratch with no pretraining.
First, install the model architecture package directly from GitHub:
pip install git+[https://github.com/N1k0l0z/Vanilla_Transformer.git](https://github.com/N1k0l0z/Vanilla_Transformer.git)
import torch
from huggingface_hub import hf_hub_download
from tokenizers import Tokenizer
# 1. Import model architecture and configuration
from Scripts.Transformer import TranslationModel
from Scripts.ModelConfig import Config
# 2. Download assets from Hugging Face Hub
REPO_ID = "N1k0l0z/vanilla-transformer-georgian-english"
model_path = hf_hub_download(repo_id=REPO_ID, filename="model.pt")
tokenizer_path = hf_hub_download(repo_id=REPO_ID, filename="tokenizer.json")
# 3. Load tokenizer and PyTorch checkpoint
tokenizer = Tokenizer.from_file(tokenizer_path)
checkpoint = torch.load(model_path, map_location="cpu", weights_only=False)
# 4. Initialize model and load trained weights
model = TranslationModel(checkpoint["config"])
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
# 5. Translate!
print(model.translate("ვინ ხარ?", tokenizer, direction="2en"))
# Output: "Who are you?"
print(model.translate("Where is your house?", tokenizer, direction="2ka"))
# Output: "სად არის შენი სახლი?"
Georgian → English
| Input | Output |
|---|---|
| ვინ ხარ? | Who are you? |
| სად არის შენი სახლი? | Where is your house? |
| გამარჯობა, როგორ ხარ? | How are you? |
| დღეს კარგი ამინდია. | It is a good weather today. |
| ყავა ძალიან მიყვარს. | I love coffee. |
English → Georgian
| Input | Output |
|---|---|
| Where is the house? | სად არის სახლი? |
| Hello, nice to meet you. | კარგი, ძალიან კარგად გამოიყურები. |
| This project is built from scratch. | ეს პროექტი აშენებულია. |
| I am learning how transformers work. | მე როგორ მსურს, როგორ მუშაობს სამუშაო. |
| See you tomorrow morning. | ხვალ დილით წადი. |
If referencing the original architecture:
Vaswani, A. et al. (2017). Attention Is All You Need. NeurIPS.