attend op• Data kinds: tokens × tokens × tokens → tokens
• Call: import fullseye as fs; fs.ledger.attention_linear(query, key, value, causal: 'bool' = False) -> 'np.ndarray' (to call the implementation directly, import llmcore; llmcore.attention_linear(query, key, value, causal: 'bool' = False) -> 'np.ndarray'; from the registry, opsllmcore.get("attention_linear"))
Attention with the softmax removed → tokens. (QKᵀ)V == Q(KᵀV) — the associative law itself.
Katharopoulos et al. 2020. Removing the softmax lets the associativity of matrix products apply, so without building (T, T) a state of just (d, dv) suffices. It is the same number bracketed differently, so the answers agree (relative difference 7.1e-16), and the cost moves from O(T²d) to O(Td²) — the crossover is at T == d (measured: ratio 0.9 at T=d=64, 14.6 times at T=1024). ★Even at T = 2048 the ratio levels off at 14.4. It does not reach the 32 times the formula predicts — because the quadratic side becomes band(width)-bound.
Args:
query: (T, d) float.
key: (S, d) float.
value: (S, dv) float. With causal=True, S == T.
causal: if True, adds "only what comes before me" through a cumulative state (1 sequential pass, linear time).
Returns:
tokens (T, dv) float: it does not pass through a softmax, so it is not a convex combination with row sums of 1.
Not a substitute for attention_softmax, but a different attention.
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• poc_attention_identities — py -3.11 examples/poc_attention_identities.py
tokens as input)rms_norm · rope_rotate · attention_scores · attention_apply · attention_softmax · attention_tiled · attention_grouped · kv_cache_decode
attend)attention_softmax · attention_tiled · attention_grouped
*Provenance: llmcore.py — LLMCORE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.