attention_scores — LLMCORE score op

• Data kinds: tokens × tokens → attnmap

• Call: import fullseye as fs; fs.ledger.attention_scores(query, key, scale=None) -> 'np.ndarray' (to call the implementation directly, import llmcore; llmcore.attention_scores(query, key, scale=None) -> 'np.ndarray'; from the registry, opsllmcore.get("attention_scores"))

Usage

Raw attention scores QKᵀ/√d → attnmap (T, S).

Args:

query: (T, d) float. The querying side.

key: (S, d) float. The side being looked up. d is the same as for query.

scale: score multiplier. None means 1/√d (Vaswani et al. 2017 -- cancels the inner product growing in proportion to d

and making softmax sharp).

Returns:

attnmap (T, S) float: raw scores before softmax.

Detailed usage guide

• llmcore family guide

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

• poc_attention_identities — py -3.11 examples/poc_attention_identities.py

Ops the type connects to (they accept attnmap as input)

attention_weights · attention_apply

Same category (score)

attention_weights · attention_apply


*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.