IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 function

build_synthetic_acceptance_sampler_graph

build_synthetic_acceptance_sampler_graph()​

max.pipelines.sampling.build_synthetic_acceptance_sampler_graph(device, base_acceptance_rate, num_draft_steps)

source

Builds a graph that implements synthetic acceptance sampling.

The seed is a graph input so callers can bind a fresh int64 value per execution; without that, static-seed RNG would produce the same random draws every call.

Parameters:

  • device (DeviceRef) – Device for the graph.
  • base_acceptance_rate (float) – Per-position acceptance probability.
  • num_draft_steps (int) – Number of draft tokens per step.

Return type:

Graph