pub struct EngineConfig {Show 25 fields
pub backend: Backend,
pub num_gpu_blocks: usize,
pub block_size: usize,
pub max_model_len: Option<usize>,
pub max_num_seqs: usize,
pub max_num_batched_tokens: usize,
pub enable_prefix_caching: bool,
pub enable_chunked_prefill: bool,
pub speedup_ratio: f64,
pub decode_speedup_ratio: f64,
pub aic_nextn: Option<usize>,
pub aic_nextn_accept_rates: Option<String>,
pub aic_mtp_seed: u64,
pub worker_type: WorkerType,
pub preemption_mode: PreemptionMode,
pub emit_kv_events: bool,
pub emit_kv_token_ids: bool,
pub kv_transfer_bytes_per_token: Option<usize>,
pub kv_cache_bytes_per_token: Option<usize>,
pub native_host_offload: Option<NativeHostOffloadConfig>,
pub kv_transfer_bandwidth: Option<f64>,
pub kv_transfer_timing_mode: TransferTimingMode,
pub timing_model: TimingModelConfig,
pub sglang: SglangConfig,
pub trtllm: TrtllmConfig,
}Expand description
Serializable configuration for one scheduler rank.
Attention-DP size and worker identity belong to
crate::engine::generalized::GeneralizedEngineConfig and
crate::engine::generalized::EngineIdentity, not this rank-local configuration.
Default constructs a vLLM configuration. Changing only Self::backend
afterward does not recompute backend-dependent fields such as
Self::block_size; start with Self::for_backend when constructing a
different backend in Rust. Deserialization selects the backend’s block-size
default when block_size is omitted.
Fields§
§backend: BackendScheduler backend whose semantics this rank executes.
Use Self::for_backend instead of changing this field on
Self::default when backend-dependent defaults are desired.
num_gpu_blocks: usizePhysical G1 capacity in blocks.
block_size: usizeKV block size in tokens.
max_model_len: Option<usize>Optional model context limit.
max_num_seqs: usizeMaximum concurrently runnable sequences.
max_num_batched_tokens: usizePer-pass token budget.
enable_prefix_caching: boolWhether complete blocks remain reusable after request release.
enable_chunked_prefill: boolWhether a prompt may be split across scheduler passes.
speedup_ratio: f64Divisor applied to modeled prefill and decode latency.
decode_speedup_ratio: f64Additional divisor applied to decode latency.
aic_nextn: Option<usize>MTP/EAGLE draft-token count. One verification forward can emit up to
aic_nextn + 1 output tokens.
aic_nextn_accept_rates: Option<String>Conditional draft acceptance rates, comma-separated.
Entry i is the probability that draft i is accepted given that
every preceding draft was accepted.
aic_mtp_seed: u64Base seed for deterministic worker-local MTP acceptance sampling.
worker_type: WorkerTypeScheduler role.
preemption_mode: PreemptionModeDecode preemption victim order.
emit_kv_events: boolRetain and expose local token-block hashes in neutral KV events.
emit_kv_token_ids: boolRetain block token IDs alongside neutral KV events.
kv_transfer_bytes_per_token: Option<usize>Bytes transferred per prompt token for disaggregated handoff timing.
kv_cache_bytes_per_token: Option<usize>Physical KV-cache bytes occupied by one token for host offload.
native_host_offload: Option<NativeHostOffloadConfig>Optional framework-native host-offload simulation.
kv_transfer_bandwidth: Option<f64>Modeled prefill-to-decode transfer bandwidth in decimal GB/s.
kv_transfer_timing_mode: TransferTimingModePrompt footprint used to model disaggregated transfer time.
timing_model: TimingModelConfigSerializable timing-provider descriptor.
sglang: SglangConfigSGLang-only scheduler controls.
trtllm: TrtllmConfigTensorRT-LLM-only scheduler controls.
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn for_backend(backend: Backend) -> Self
pub fn for_backend(backend: Backend) -> Self
Construct a configuration with the selected backend’s native defaults.
In particular, this selects Backend::default_block_size instead of
inheriting the vLLM block size from Self::default.
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more