Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


## Vanilla Transformer (PyTorch)
My PyTorch implementation of the original Transformer model from the paper [Attention Is All You Need](https://arxiv.org/abs/1706.03762) inspired by all the codes and blogs I've read on this topic. There's nothing really special going on here except the fact that I tried to make it as barebone as possible. There is also a training code prepared for a simple German -> English translator written in pure PyTorch using Torchtext library.

Expand Down Expand Up @@ -72,6 +74,7 @@ Saved Model at weights/10.pt
```
### Inference
Given the sentence `Eine Gruppe von Menschen steht vor einem Iglu` as input in `predict.py` we get the following output which is pretty decent even though our dataset is somewhat naive & simple.
**Note:** `predict.py` expects the model weights to be located at `weights/transformer.pt`. Rename or copy a saved checkpoint (e.g., `weights/10.pt`) to this path before running.
```bash
python predict.py
```
Expand Down