Python module
sampling
Token sampling algorithms.
rejection_sampler()
max.pipelines.lib.sampling.rejection_sampler(top_k: int, device: DeviceRef) → Graph
token_sampler()
max.pipelines.lib.sampling.token_sampler(sampling_config: SamplingConfig, device: DeviceRef, return_logits: bool = False) → Graph
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!