Efficient Transformer

Untitled

https://www.tensorflow.org/text/tutorials/transformer#define_the_components

https://www.tensorflow.org/text/tutorials/transformer#define_the_components

The global self attention layer

Untitled

Untitled

The causal self attention layer

Untitled

Untitled

The cross-attention layer

Untitled

Each query sees the whole context.

Each query sees the whole context.

Untitled

Layer normalization

Residual connection

Untitled

Untitled

Untitled

transformer_decoding_2.gif

transform20fps.gif