Skip to content

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

License

Notifications You must be signed in to change notification settings

boji123/attention-is-all-you-need-pytorch

 
 

Repository files navigation

使用说明

将原来的transformer翻译模型用于智能客服QA系统的一个实践,更改了代码使之适配中文数据,使用结巴分词来处理中文文本

添加了在SGE集群上提交任务的脚本run.sh

Attention is all you need: A Pytorch Implementation

This is a PyTorch implementation of the Transformer model in "Attention is All You Need" (Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, arxiv, 2017).

A novel sequence to sequence framework utilizes the self-attention mechanism, instead of Convolution operation or Recurrent structure, and achieve the state-of-the-art performance on WMT 2014 English-to-German translation task. (2017/06/12)

The official Tensorflow Implementation can be found in: tensorflow/tensor2tensor.

To learn more about self-attention mechanism, you could read "A Structured Self-attentive Sentence Embedding".

The project support training and translation with trained model now.

Note that this project is still a work in progress.

If there is any suggestion or error, feel free to fire an issue to let me know. :)

Requirement

  • python 3.6.5+
  • pytorch 0.4.1+
  • tqdm
  • numpy

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 70.1%
  • Perl 28.0%
  • Shell 1.9%