Attention and a small Transformer with a hand-written backward pass

0
Remix

Implement scaled dot-product attention and a small autoregressive Transformer block from scratch, including the causal mask. Then write the backward pass by hand (no autograd) for the pieces the interviewer picks, and check your gradients numerically.

TeslaTechnical phone screenLast asked Aug 2025
No answer yet. Write the first one; the best answer gets endorsed.