#524 · Primary category: Education & Research

attention-is-all-you-need-pytorch

attention attention-is-all-you-need deep-learning natural-language-processing nlp pytorch

A PyTorch implementation of the Transformer model in "Attention is All You Need".

Project last updated:04/16/24

GitHub Stars

9.8K

Forks

2.1K

Contributors

9

License

MIT

Why we included this project

Students and researchers who want to see the Transformer implementation, rather than consume it through a framework, will appreciate how directly this project mirrors the 2017 'Attention is All You Need' paper. The code lays out self-attention, multi-head attention, positional encoding, and the encoder-decoder stack in plain PyTorch, and ships training scripts that run the WMT'16 German-to-English multimodal task end to end. Because it stays close to the paper's design, tracing exactly where each piece fits is far easier here than inside a larger library. It also makes a tidy starting point for experiments that tweak attention or decoder structure. Just treat it as an academic reference rather than a maintained production tool, and plan to rework the preprocessing for your own data.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category