Skip to content

quanpn90/NMTGMinor

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
January 12, 2023 13:43
January 12, 2023 13:43
September 1, 2020 17:47
June 9, 2022 00:48
June 8, 2022 16:47
January 12, 2023 13:43

Introduction

Requirements and Installation

Currently NMTG requires PyTorch version >= 1.8.0. Best is 1.10.0 Please follow the instructions here: https://github.com/pytorch/pytorch#installation.

After PyTorch is installed, you can install the requirements with:

pip install -r requirements.txt

C++/CUDA module installation

NMTG supports a couple of modules written using custom Pytorch/C++/CUDA modules to utilize GPU better and reduce overheads, including:

  • Self-attention and encoder-decoder attention with CUBLASLT
  • Multi-layer Perceptrons with CUBLASLT and fused dropout-relu/gelu/silu where inplace is implemented whenever possible
  • Highly optimized layer norm and multi-head attention (only available with sm80 (NVIDIA A100)) from Apex
  • Fused Logsoftmax/Cross-entropy loss to save memory for large output layer, from Apex
  • Fused inplaced Dropout Add for residual Transformers

Installation requires CUDA and nvcc with the same version with PyTorch. Its possible to install CUDA from conda via:

conda install -c nvidia/label/cuda-11.3.1 cuda-toolkit

or if using a custom version with CUDA 11.5

conda install -c nvidia/label/cuda-11.5.2 cuda-toolkit

(depending on the CUDA version that comes with your PyTorch)

And then navigate to the extension modules and install nmtgminor-cuda via

cd onmt/modules/extension
python setup.py install

Without this step, all modules backoff to PyTorch versions.

IWSLT 2022 Speech Translation models

Interspeech 2022 Multilingual ASR models

About

A Neural Machine Translation toolkit for research purpose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published