Skip to main content
Log in

Python module

sampling

rejection_sampler()

max.pipelines.lib.sampling.rejection_sampler(top_k, device)

Parameters:

  • top_k (int )
  • device (DeviceRef )

Return type:

Graph

token_sampler()

max.pipelines.lib.sampling.token_sampler(sampling_config, device, return_logits=False)

Parameters:

  • sampling_config (SamplingConfig )
  • device (DeviceRef )
  • return_logits (bool )

Return type:

Graph