Heavily-commented "Annotated Transformer" (cf. A.M. Rush's tutorial)
- Clarify the nice Transformer tutorial by A.M. Rush, which leaves out details I believe could be helpful to a newbie as I was (e.g. tensor shapes, self-documentation variable naming, etc.)
- Complete the tutorial code with data loading/formatting facitilities, and demo in a paraphrasing example with toy data ("real data" can be downloaded from, e.g. Prakash/16's paraphrasing datasets.
- To see usage, check out
example_train.py
andexample_evaluate.py
. - Run
example_train.py
to save model and config, which are prerequisites forexample_evaluate.py
.
- torch=1.1.0
- cuda=9.2