For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python class
SamplerInputs
SamplerInputsβ
class max.pipelines.sampling.SamplerInputs(top_k, max_k, temperature, top_p, min_top_p, min_p, seed)
Bases: object
Container for sampler inputs.
-
Parameters:
as_list()β
as_list()
Returns the sampler inputs as a list of buffers.
create()β
classmethod create(batch, device)
Create sampling parameter tensors from context batch.
-
Parameters:
-
- batch (list[TextContext]) β List of context objects containing sampling parameters.
- device (Device) β Device to place the tensors on.
-
Returns:
-
SamplerInputs containing the sampling parameter tensors.
-
Return type:
max_kβ
max_k: Buffer
min_pβ
min_p: Buffer
min_top_pβ
min_top_p: Buffer
seedβ
seed: Buffer
temperatureβ
temperature: Buffer
top_kβ
top_k: Buffer
top_pβ
top_p: Buffer
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!