cswork / OAOpen practice workspace

MeshyOA #8

Attention as Adder (Python)

Estimated MediumStatement and editorial — judging is being prepared

Topics (AI-labelled)Bits & Math

Given a single layer of self-attention, manually figure out the parameters Q, K, V (i.e. W_q, W_k, W_v) required to compute the sum of two scalar inputs.

Inputs:
 v.shape == (1, 2, 1) # batch x sequence x hidden, values e.g. [1, 10]
Expected:
 result[0, 0, 0] == 1 + 10 == 11

Editorial

Loading solution…