MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / SparseMultiheadAttention

Class SparseMultiheadAttention

fairseq/modules/sparse_multihead_attention.py:11–104  ·  view source on GitHub ↗

Sparse Multi-Headed Attention. "Generating Long Sequences with Sparse Transformers". Implements fixed factorized self attention, where l=stride and c=expressivity. A(1) includes all words in the stride window and A(2) takes a summary of c words from the end of each stride window.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

__init__Method · 0.90

Calls

no outgoing calls

Tested by 1