Gumbel Max Trick for Softmax Sampling
I came across this gumbel max trick recently while working on llm samplers. It’s a neat trick to the standard softmax sampling that is mathematically equivalent but is very efficient. It doesn’t require us to compute any concrete softmax vectors instead it just adds noise and takes the argmax, this makes the whole procedure extremely simple and efficient
Darshan Makwana