Post
5011
Implemented a proof of concept sampler in pure PyTorch and transformers.
Max P consists of a dynamic token filter which applies Winsorization to cap the probabilties of top tokens. Specifically, a base probability in the range of [0,1] is used to cap individual token probability; the sampler then redistributes excess proportionally.
https://github.com/jim-plus/maxp-sampler-poc
Combined with Temperature and Min P, this could represent a more intuitive way of reducing repetition in text generation.
Max P consists of a dynamic token filter which applies Winsorization to cap the probabilties of top tokens. Specifically, a base probability in the range of [0,1] is used to cap individual token probability; the sampler then redistributes excess proportionally.
https://github.com/jim-plus/maxp-sampler-poc
Combined with Temperature and Min P, this could represent a more intuitive way of reducing repetition in text generation.