← Questions

Stable softmax and multi-head attention in NumPy

0
AmazonCodingLast asked Jul 2026

In NumPy, implement a numerically stable sigmoid and softmax, then scaled dot-product attention, then multi-head attention from scratch.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding