attend op• Datenarten: tokens × tokens × tokens → tokens
• Aufruf: import fullseye as fs; fs.ledger.attention_grouped(query, key, value, n_heads: 'int', n_kv_heads: 'int', mask=None, window=None) -> 'np.ndarray' (die Implementierung direkt: import llmcore; llmcore.attention_grouped(query, key, value, n_heads: 'int', n_kv_heads: 'int', mask=None, window=None) -> 'np.ndarray'; aus dem Register: opsllmcore.get("attention_grouped"))
> Für diesen Operator gibt es noch keine Übersetzung. Es folgt der Originaltext unverändert.
頭を束ねる注意(GQA)→ tokens。n_kv_heads == n_heads で MHA、== 1 で MQA に厳密一致。
Ainslie ら 2023。query は `n_heads 本に割り、key/value は n_kv_heads` 本しか
持たずに使い回す。両端が既存の 2 つ(MHA / MQA)に厳密に落ちる(どちらも 0.0e+00)
ので、「中間を取る」という主張が端で検算できる。
Args:
query: (T, n_heads·dh) float。頭ごとに幅 dh で並んでいる。
key: (S, n_kv_heads·dh) float。
value: (S, n_kv_heads·dh) float。
n_heads: query の頭の数。`n_kv_heads` の倍数であること。
n_kv_heads: key/value の頭の数。1 なら MQA、`n_heads` なら MHA。
mask: None / `"causal" / "window"` / (T, S) の bool 配列。
window: `mask="window"` のときの窓幅。
Returns:
tokens (T, n_heads·dh) float: 頭ごとの出力を横に連結したもの。
• Leitfaden zur Familie llmcore
• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).
• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.
• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.
• poc_attention_identities — py -3.11 examples/poc_attention_identities.py
tokens als Eingabe)rms_norm · rope_rotate · attention_scores · attention_apply · attention_softmax · attention_tiled · attention_linear · kv_cache_decode
attend)attention_softmax · attention_tiled · attention_linear
*Provenance: llmcore.py — LLMCORE Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.