SGNMT is an open-source framework for neural machine translation (NMT) and other sequence prediction tasks. The tool provides a flexible platform which allows pairing NMT with various other models such as language models, length models, or bag2seq models. It supports rescoring both n-best lists and lattices. A wide variety of search strategies is available for complex decoding problems.

SGNMT is compatible with the following NMT toolkits:

Old SGNMT versions (0.x) are compatible with:


  • Syntactically guided neural machine translation (NMT lattice rescoring)
  • Target-side syntax for NMT
  • n-best list rescoring with NMT
  • Integrating external n-gram posterior probabilities used in MBR
  • Ensemble NMT decoding
  • Forced NMT decoding
  • Integrating language models
  • Different search algorithms (beam, A*, depth first search, greedy...)
  • Target sentence length modelling
  • Bag2Sequence models and decoding algorithms
  • Joint decoding with word- and subword/character-level models
  • Hypothesis recombination
  • Heuristic search
  • ...


  • Felix Stahlberg, University of Cambridge
  • Eva Hasler, SDL Research
  • Danielle Saunders, University of Cambridge


The project is licensed under the Apache 2 license.

Indices and tables