Skip to content
Snippets Groups Projects
Commit a3c8d86f authored by Lev Zlotnik's avatar Lev Zlotnik Committed by Guy Jacob
Browse files

LSTM: Modular implementation + Post-Train Quantization Sample (#196)

* Introduce a modular, Python-level implementation of LSTM/LSTMCell
  using existing PyTorch nn.Modules as building blocks
* This allows quantization of weights and internal activations of
  LSTM layers using the existing Quantizer. 
  (In the PyTorch implementation of RNN/LSTM only the weights are 
  exposed at the Python level, whereas the internal activations are 
  "hidden" in C++ code.)
* Supports stacked (multi-layer) and bi-directional LSTM
* Implemented conversion functions from PyTorch LSTM module to
  our LSTM module and vice-versa
* Tests for modular implementation correctness and for conversions
* Jupyter notebook showing post-training quantization of a language
  model
parent 52c4d0b0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment