IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python function

normalize_depth_schedule

normalize_depth_schedule()โ€‹

max.pipelines.speculative.depth_schedule.normalize_depth_schedule(entries)

source

Validates a schedule and returns it sorted by batch size.

Parameters:

entries (Sequence[Sequence[int]]) โ€“ Triples of (batch_start, batch_end, depth).

Returns:

The entries as tuples, sorted ascending by batch_start.

Raises:

ValueError โ€“ If entries is empty, an entry is not a triple, a range is not positive and ascending, a depth is negative, ranges overlap, or the first range does not start at batch size 1. Starting at 1 is required so every runtime batch size resolves to a depth.

Return type:

list[tuple[int, int, int]]