Skip to main content

Module model_executor

Module model_executor 

Source
Expand description

Model execution interface with clear prefill/decode separation

This module provides the ModelExecutor trait that replaces the “fat” Model interface, focusing purely on tensor operations without tokenization or sampling.

Structs§

DecodeInput
Input for decode phase (generating one token at a time)
DecodeOutput
Output from decode phase
ExecutorAdmissionEpochs
Stable scheduler-facing projection of one plan-runtime capacity domain.
ExecutorAttentionConfig
Runtime attention configuration for model executor
ExecutorCapabilities
Executor capabilities and configuration
ExecutorCapacityWaitRegistration
Type-erased, single-use registration for one plan-runtime capacity wait.
ExecutorConfig
Executor configuration
ExecutorExecutionCapacityDeferral
ExecutorExecutionCapacityEvidence
Exactly one typed owner for an execution-capacity deferral.
ExecutorExecutionCapacityPreemption
Request-scoped authority selected for a capacity-pressure preemption.
ExecutorExecutionCapacityPreemptionReceipt
Proof that the executor retired one exact request authority to a terminal state. Source-generation advancement remains independently verified by the engine before the scheduler may resume another frontier.
ExecutorExecutionMaintenanceMutation
One exact physical pool mutation completed while an executor was trying to make an unsubmitted frontier runnable.
ExecutorExecutionMaintenanceProgress
Typed proof that a bounded executor call committed relevant backing growth before yielding the same logical frontier back to the scheduler.
ExecutorExecutionMaintenanceRetry
Scheduler-consumable proof binding physical maintenance to the exact logical frontiers whose unsubmitted execution attempt observed it.
ExecutorMemoryConfig
Memory configuration for executor
ExecutorMemoryUsage
Executor memory usage
ExecutorMetrics
Executor performance metrics
ExecutorPrefillAdmission
Borrowed, already-tokenized input used to probe plan-runtime prefill admission before the request can enter a device submission batch.
ExecutorPrefillAdmissionReceipt
Scheduler-visible proof that an executor retained request and sequence authority for future scheduler-owned prefill chunks.
ExecutorPrefillCompletion
Capacity-aware result for one planned prefill frontier.
ExecutorPrefillMaintenanceDeferral
Non-authoritative projection of plan-runtime maintenance work.
ExecutorRequestStateDeferral
Scheduler-visible proof that execution is temporarily blocked by a Request-lifetime state hazard rather than by physical capacity.
ExecutorSequenceCompletion
Product-authoritative evidence for a successfully completed sequence.
ExecutorStatus
Executor status information
GreedyRepetitionPenalty
Sparse repetition-penalty metadata for model-side greedy argmax.
KvSlotAllocation
Per-cache outcome from a KV slot reservation attempt.
KvSlotCapacitySnapshot
Point-in-time model-owned paged-KV capacity snapshot.
KvSlotRequest
One model-owned KV slot reservation request.
KvSlotReservation
Model-owned paged-KV reservation evidence.
MemoryRequirements
Memory requirements for model execution
OptimizationConfig
Optimization configuration
PlanRuntimeDecodeInput
Tensor-free decode input for an executor with plan-runtime resource authority.
PlanRuntimeDecodeOutput
Tensor-free decode output from a plan-runtime executor.
PlanRuntimePrefillAuthority
Exact executor-owned authority advanced by one prefill completion.
PlanRuntimePrefillCompletion
Capacity-aware result for one tensor-free plan-runtime prefill frontier.
PlanRuntimePrefillInput
Tensor-free prefill input for an executor with plan-runtime resource authority.
PlanRuntimePrefillOutput
Tensor-free prefill output bound to one request and committed KV extent.
PlanRuntimeResourceSnapshot
Point-in-time memory evidence emitted by the shared plan runtime.
PrefillChunk
Exact, validated prompt progress assigned to one prefill invocation.
PrefillInput
Input for prefill phase (processing the initial prompt)
PrefillOutput
Output from prefill phase
SpeculativeDecodeOutput
Output from speculative decoding
TokenSelectionMask
Token-validity mask for model-side greedy argmax.
UnifiedBatch
A mixed-batch forward request: any combination of in-progress prefill chunks and decode steps. See UnifiedBatchItem for the per-item semantics. The producer (engine) groups all sequences active in this iter into a single batch; the consumer (model) runs one forward and returns per-item logits (only for items with is_final_chunk = true, in the order they appear in items).
UnifiedBatchItem
One sequence’s contribution to a unified mixed-batch forward.

Enums§

AttentionType
Attention mechanism types
ExecutionResourceAuthority
Declares the authoritative owner of request-lifetime accelerator resources.
ExecutorBatchDecodeOutcome
Capacity-aware batch decode result.
ExecutorBatchPrefillOutcome
Transactional result of attempting one physical prefill batch.
ExecutorExecutionCapacityEvidenceOwner
Scheduler-visible proof that an execution attempt was not submitted and must not be retried until one of its exact capacity sources changes.
ExecutorExecutionCapacityPreemptionAuthority
ExecutorExecutionCapacityStage
Pre-submit runtime stage that could not acquire its exact dynamic capacity.
ExecutorExecutionDeferral
A pre-submit execution frontier can be blocked by independently evolving sources. Capacity waits participate in scheduler pressure/yield policy; Request-state waits never do and resume only from their exact hazard coordinator.
ExecutorPrefillAdmissionDecision
Typed result of probing plan-runtime prefill capacity.
ExecutorPrefillMaintenanceBlocker
Scheduler-visible reason that a prefill needs plan-runtime backing maintenance. These values are projections only and cannot allocate memory.
ExecutorPrefillMaintenanceOutcome
Result of one bounded plan-runtime backing maintenance attempt.
ExecutorPrefillMaintenanceStage
Stage that must advance before a plan-runtime prefill can be admitted.
ExecutorPrefillOutcome
ExecutorRequestOrigin
Typed origin for an executor-owned request lifecycle.
ExecutorSamplingOutput
Typed product output returned by a plan-runtime execution wave.
ExecutorState
Executor state
ExecutorType
Supported executor types
LogitsReturnPolicy
PlanRuntimeBatchDecodeOutcome
Capacity-aware, tensor-free batch decode result for a plan runtime.
PlanRuntimeBatchPrefillOutcome
PlanRuntimePrefillOutcome
PlanRuntimePrefillProduct
Product state emitted by one completed plan-runtime prefill chunk.

Traits§

BatchModelExecutor
Batch model executor for processing multiple requests efficiently
ExecutorRegistry
Executor registry for managing multiple executors
ModelExecutor
Core model executor trait focusing on tensor operations
ModelExecutorFactory
Model executor factory
SpeculativeExecutor
Speculative execution support