Skip to content

Fast Transformer v0.1.0

Compare
Choose a tag to compare
@Rishit-dagli Rishit-dagli released this 03 Sep 05:34
· 24 commits to main since this release
5ed6f39

This is the initial release of Fast Transformer and implements Fast Transformer as a subclassed TensorFlow model.

Classes

  • FastAttention: Implements additive attention as a TensorFlow Keras layer, and supports using relative positional encodings.
  • PreNorm: Normalize the activations of the previous layer for each given example in a batch independently and apply some function to it, implemented as a TensorFlow Keras Layer.
  • FeedForward: Create a FeedForward neural net with two Dense layers and GELU activation, implemented as a TensorFlow Keras Layer.
  • FastTransformer: Implements the FastTransformer model using all the other classes, allows using rotary embeddings, weight tie projections, and converts to logits. Implemented as a TensorFlow Keras Model.