skylabsmall lessons. big ideas.

General · LESSON 12 OF 33 · 1 min

Turning scores into percentages.

0:00 / 0:47

About this lesson

Turning scores into percentages. — a video lesson in attention is all you need. Learn attention is all you need through short video lessons.

Continue in the reels feed ↓

Video transcript

Last time, tired got raw scores: animal nine, street three, was one. Raw scores can be any size, so they are hard to use as mixing amounts.

Why not just divide each score by the total, thirteen?

That could work, but softmax does something sharper. First it raises e to each score. Big scores get hugely bigger, and nothing goes negative.

Now add them up: about eight thousand one hundred twenty three. Then divide each one by that total. What share do you think animal gets?

So animal gets ninety nine point seven percent, and street and was are nearly zero.

Yes. Softmax turns raw scores into weights that add up to one. Next, we use them to mix values.