Top-k Sampling Visualized: Lori at 73%, Alice at 27%, Alice Wins the Draw

cfregly · x · 2026-11-11

Another installment of the cartoon CUDA series explains top-k sampling: Jensen scores candidates and keeps only the two highest — Lori (3→73%) and Alice (2→27%) — filtering out "Neither". After renormalizing, this draw samples Alice, showing how top-k reshapes the generation distribution.

Related event: Cartoon Series Explains Sliding Window Attention and Top-k Sampling(2 posts)→

Original post →

More from Infra

Infra channel →