Python function
rejection_sampler
rejection_sampler()โ
max.pipelines.lib.rejection_sampler(device, *, seed=0)
Builds a graph that implements speculative decoding rejection sampling.
Accepts or rejects draft tokens using target vs draft probabilities and resamples from the target distribution when rejected.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!