attention_apply — LLMCORE score op

• Data kinds: attnmap × tokens → tokens

• Call: import fullseye as fs; fs.ledger.attention_apply(weights, value) -> 'np.ndarray' (implementation को सीधे call करना हो तो import llmcore; llmcore.attention_apply(weights, value) -> 'np.ndarray', registry से लेना हो तो opsllmcore.get("attention_apply"))

उपयोग

attention weight से value मिलाता है → tokens। row का योग 1 है, इसलिए आउटपुट इनपुट का convex combination है।

Args:

weights: (T, S) float। rows का योग 1 होना चाहिए (attention_weights का output)।

value: (S, dv) float। जिसे मिलाया जाता है वह तरफ़।

Returns:

tokens (T, dv) float: हर row value की rows का convex combination है। value range कभी value से बाहर नहीं जाती

(साथ ही फैलाव घटता है -- औसत contrast को दबा देता है)।

उपयोग की विस्तृत guide

• llmcore family guide

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• poc_attention_identities — py -3.11 examples/poc_attention_identities.py

वे अगले ops जिनसे type जुड़ता है (tokens को input के रूप में लेते हैं)

rms_norm · rope_rotate · attention_scores · attention_softmax · attention_tiled · attention_linear · attention_grouped · kv_cache_decode

इसी category के (score)

attention_scores · attention_weights


*Provenance: llmcore.py — LLMCORE operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.