Skip to content

A simple TensorFlow implementation of the Transformer

Notifications You must be signed in to change notification settings

wszlong/transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple Tensorflow implementation of the Transformer

This project is a simple implementation of Tensor2tensor (https://github.com/tensorflow/tensor2tensor) for machine translation.

Usage

  • Preprosessing. Prepare the parallel data (token, bpe, vocab, and so on), run ./datagen.sh to generate data.

  • Training. Modify the model params (transformer_params_big or transformer_params_base, basic params are set in models/common_hparms.py), and run ./train.sh.

  • inference. Run the command to translate source sentence: ./test.sh.

C++ Version Translator

Once you have trained the model, you can also use a C++/CUDA Transformer-translator to translate source language.

Contact

If you have questions, suggestions and bug reports, please email [email protected] or [email protected].

About

A simple TensorFlow implementation of the Transformer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published