For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python module
max.nn.sampling
Sampling custom ops.
Acceptance sampling
AcceptanceSampler | Dispatches between greedy, synthetic, and stochastic acceptance. |
|---|
Sampler factories
compute_synthetic_acceptance_base_rate | Solves for the per-position base acceptance rate that matches a target mean. |
|---|---|
greedy_acceptance_sampler | Target-only rejection sampler for speculative decoding. |
stochastic_acceptance_sampler | Verifies speculative draft tokens against the target model. |
synthetic_acceptance_sampler | Synthetic sampler for speculative decoding benchmarking. |