score op• 資料種類:tokens × tokens → attnmap
• 呼叫: import fullseye as fs; fs.ledger.attention_scores(query, key, scale=None) -> 'np.ndarray'(要直接呼叫實作,import llmcore; llmcore.attention_scores(query, key, scale=None) -> 'np.ndarray';從台帳取用則 opsllmcore.get("attention_scores"))
原始注意力分數 QKᵀ/√d → attnmap (T, S)。
Args:
query: (T, d) float。發起查詢的一側。
key: (S, d) float。被查詢的一側。d 與 query 相同。
scale: 分數的倍率。None 則為 1/√d(Vaswani 等 2017 —— 抵消內積隨 d 成比例
增大而使 softmax 變尖)。
Returns:
attnmap (T, S) float: 送入 softmax 之前的原始分數。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• poc_attention_identities — py -3.11 examples/poc_attention_identities.py
attnmap 作為輸入)attention_weights · attention_apply
score)attention_weights · attention_apply
*Provenance: llmcore.py — LLMCORE 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.