The RWTH extensible training framework for universal recurrent neural networks


Keywords
deep-learning, gpu, recurrent-neural-networks, tensorflow, theano
License
MIT-enna
Install
pip install returnn==1.20240102.170719

Documentation

Welcome to RETURNN

GitHub repository. RETURNN paper 2016, RETURNN paper 2018.

RETURNN - RWTH extensible training framework for universal recurrent neural networks, is a Theano/TensorFlow-based implementation of modern recurrent neural network architectures. It is optimized for fast and reliable training of recurrent neural networks in a multi-GPU environment.

The high-level features and goals of RETURNN are:

  • Simplicity
    • Writing config / code is simple & straight-forward (setting up experiment, defining model)
    • Debugging in case of problems is simple
    • Reading config / code is simple (defined model, training, decoding all becomes clear)
  • Flexibility
    • Allow for many different kinds of experiments / models
  • Efficiency
    • Training speed
    • Decoding speed

All items are important for research, decoding speed is esp. important for production.

See our Interspeech 2020 tutorial "Efficient and Flexible Implementation of Machine Learning for ASR and MT" video (slides) with an introduction of the core concepts.

More specific features include:

  • Mini-batch training of feed-forward neural networks
  • Sequence-chunking based batch training for recurrent neural networks
  • Long short-term memory recurrent neural networks including our own fast CUDA kernel
  • Multidimensional LSTM (GPU only, there is no CPU version)
  • Memory management for large data sets
  • Work distribution across multiple devices
  • Flexible and fast architecture which allows all kinds of encoder-attention-decoder models

See documentation. See basic usage and technological overview.

Here is the video recording of a RETURNN overview talk (slides, exercise sheet; hosted by eBay).

There are many example demos which work on artificially generated data, i.e. they should work as-is.

There are some real-world examples such as setups for speech recognition on the Switchboard or LibriSpeech corpus.

Some benchmark setups against other frameworks can be found here. The results are in the RETURNN paper 2016. Performance benchmarks of our LSTM kernel vs CuDNN and other TensorFlow kernels are in TensorFlow LSTM benchmark.

There is also a wiki. Questions can also be asked on StackOverflow using the RETURNN tag.

Dependencies

pip dependencies are listed in requirements.txt and requirements-dev, although some parts of the code may require additional dependencies (e.g. librosa, resampy) on-demand.

RETURNN supports Python >= 3.8. Bumps to the minimum Python version are listed in CHANGELOG.md.

TensorFlow-based setups require TensorFlow >= 2.2.

PyTorch-based setups require Torch >= 1.0.