AUTO-CROP −25.9% margin · arXiv stamp strippedfit-w · 148%
2611.00402.pdf p 1/1 148% [fit-w|crop|theme]/: find · o: outline · y/drag: agent
› Opened src/attention.rs (142 lines)
src/attention.rsrust
pub fn scaled_dot_product(q, k, v) {
let d_k = k.dim(-
1)
as f32;
// TODO: verify scaling against Eq (1) q.matmul(&k.t()).div(d_k.sqrt()).softmax(-
1).matmul(v)
}
› Drag a region on the left pane to copy a 2× PNG path
1 Select region→2 Copy path (OSC 52)→3 Paste into agent
› Pasted image path:
~/.cache/hoja/handoff/1764389120-p1/region.png
Example agent transcriptionEquation (1)
\operatorname{Attention}(Q, K, V) = \operatorname{softmax}\!\left(\frac{Q K^\top}{\sqrt{d_k}}\right) VMarkdown + LaTeX bufferfixtures/sample-math.md
# Attention NotesScaled dot-product attention maps
$Q \in \mathbb{R}^{n \times d_k}$:
$$\operatorname{Attention}(Q, K, V) = \operatorname{softmax}\!\left(\frac{QK^T}{\sqrt{d_k}}\right) V$$## Multi-Head Attention