bobofamilyNIU CHUN
Tags05

#Softmax

2026-09-23·—READS·—LIKES·Learning AI with AI

One Line Changed: Where Every Symbol in the Attention Formula Comes From

softmax(QKᵀ/√dₖ)V — this part earns each of its symbols one at a time. Starting from the crudest option, plain averaging, it goes through “a lower-triangular matmul is a weighted sum” and “softmax with −∞ masks the future” to “scores computed as q·k”: from averaging to attention, the code changes by one line. Encoder and decoder differ by one line too. And the final √dₖ is part 15's variance formula used in a new place.

2026-09-03·—READS·—LIKES·Learning AI with AI

From 2 Classes to 27: Only Three Parts to Add

Cat-versus-dog and predicting the next character are the same problem, differing only in that the class count goes from 2 to 27. The three parts that difference requires: one-hot, softmax, cross-entropy — and why cross-entropy is not a fancier squared error.