transformer icon indicating copy to clipboard operation
transformer copied to clipboard

A Transformer implementation in Keras' Imperative (Subclassing) API for TensorFlow.

transformer

https://www.tensorflow.org/beta/tutorials/text/transformer https://github.com/tensorflow/models/tree/master/official/transformer/v2

Updated for TensorFlow 2, the old version is on the 1_x branch.

This is implemented in the most frictionless approach I have found so far for training keras models that save to SavedModels that can be used elsewhere. See 1_x branch for other approaches.

Demos for classification and translation from trained SavedModels are available.