You can think of it as applying an additional selection mask in top-p/k sampling at certain positions. Like if you have 5 likely choices in top-p selected by random sampling, the watermarking would do that random sampling with a random seed depending on the previous token