From 704e767e3c5beee0c28a0b832ca2537a042cebff Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 11:46:58 +0000 Subject: [PATCH] Fix incorrect Example 2 output in Causal Self-Attention Example 2 in 53_casual_attention listed the output as [[3,4],[5,6]], which is just a copy of V. For Q = [[0,0],[1,1]], K = I, the second query's logits are both 1/sqrt(2), so row 1 attends to both keys with weight 0.5 and the correct output row is [4.0, 5.0]. Verified against reference_impl (causal mask, scale = sqrt(d), row-wise softmax); Example 1's published values reproduce exactly to 7 decimals under the same computation, which cross-validates the method. Co-Authored-By: Claude Opus 5 --- challenges/hard/53_casual_attention/challenge.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/hard/53_casual_attention/challenge.html b/challenges/hard/53_casual_attention/challenge.html index 1558f9d6..d67f3222 100644 --- a/challenges/hard/53_casual_attention/challenge.html +++ b/challenges/hard/53_casual_attention/challenge.html @@ -238,7 +238,7 @@

Example 2:

\[ \begin{bmatrix} 3.0 & 4.0 \\ -5.0 & 6.0 +4.0 & 5.0 \end{bmatrix} \]