iabd / QuantizedNMT

8 bit quantizated Transformer for neural machine translation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quantized Transformer for Machine Translation

Normal Training

python3 train.py -batchSize 3200 -datapath ./data/ -devices 0 1 2 3 -epochs 10 -modelType large -sourceLang it -targetLang en

Quantization Aware Training

python3 train.py -batchSize 3200 -datapath ./data/ -devices 0 1 2 3 -epochs 10 -modelType large -sourceLang it -targetLang en -trainMode manmp -activationBits 8 -weightBits 16 -requantizeOutputs True

Translation

python3 test.py -trainedModel ./checkpoints/model1/best.chkpt 

Note

File Trace.py is identical to train.py but with NVTX traces. The file is meant to be run to trace the GPU time of each code segment.

About

8 bit quantizated Transformer for neural machine translation.

License:Apache License 2.0


Languages

Language:Python 100.0%