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 class

EagleProposer

EagleProposer​

class max.pipelines.speculative.eagle.EagleProposer(draft, hidden_dim)

source

Bases: object

Drafts through an EAGLE draft module, one token per step.

The draft is called with the step’s tokens and the hidden state it fuses with their embeddings, and returns logits followed by its own hidden states. Its embedding and head are the target’s.

Parameters:

carry_dim_names​

carry_dim_names = CarryDimNames(prefix='', per_device=False)

source

decode_swaps​

decode_swaps: tuple[DecodeKVSwap, ...] = (DecodeKVSwap.MAX_PROMPT_LENGTH_ONE, DecodeKVSwap.DRAFT_ATTENTION_DISPATCH_METADATA)

source

draft_cache​

draft_cache = 'own'

source

passthrough_decode_swaps​

passthrough_decode_swaps: tuple[str, ...] = ()

source

prefill()​

prefill(batch, tokens, target_hidden)

source

Proposes the first draft token from the target’s hidden states.

Parameters:

Return type:

Proposed

reuse​

reuse: ReuseSpec | None = None

source

split_prefix​

split_prefix = 'eagle'

source

step()​

step(batch, draft_input, index)

source

Runs one draft step on the previous step’s token and state.

Parameters:

Return type:

Proposed

step_hidden_mode​

step_hidden_mode = 'last'

source

supports_zero_draft_rows​

supports_zero_draft_rows = True

source

uses_thinking_phase​

uses_thinking_phase = False

source