Mocker CLI Reference

Command-line flags for live Mocker workers

View as Markdown

python3 -m dynamo.mocker launches a simulated Dynamo worker that registers with the frontend, publishes KV events, and exercises the router and planner paths without a GPU. This page is the flag reference. For the deployment workflow and local/Kubernetes launch recipes, see Simulate a Kubernetes Deployment or Simulate a Local Deployment; for the engine internals these flags configure, see Mocker Engine Architecture.

Run python3 -m dynamo.mocker --help for the complete option list supported by the installed version.

AISimulate reuses the same engine core for offline virtual-clock prediction and recommendation, but its public YAML is separate from these live-worker flags. See the DynoSim Replay CLI Reference for the offline contract. The former public Replay online CLI remains unavailable, although the Python replay SDK retains online mode.

Core and model

--version
booleanDefaults to false

Print the Dynamo Mocker version and exit.

--model-path
stringDefaults to null

Hugging Face model ID or local path for the tokenizer. Set this for normal frontend requests.

--model-name
stringDefaults to derived from --model-path

Model name used in API responses.

--endpoint
stringDefaults to auto-derived

Dynamo endpoint string. Defaults are namespace-dependent, and prefill workers use a different default endpoint than aggregated or decode workers.

--engine-type
stringDefaults to vllm

Engine simulation type.

Allowed values: vllm sglang trtllm
--extra-engine-args
pathDefaults to null

Path to a JSON file with mocker configuration. Overrides individual CLI arguments.

KV cache

--num-gpu-blocks-override
integerDefaults to auto

Usable KV cache blocks per data-parallel rank. Non-AIC timing defaults to 16,384 blocks; AIC timing estimates capacity when this option is omitted.

--block-size
integerDefaults to engine-specific

Tokens per KV cache block. Defaults are 64 for vLLM, 1 for SGLang, and 32 for TensorRT-LLM.

--max-model-len
integerDefaults to null

Maximum sequence length, including prompt and generated tokens. Omitting the option leaves the simulated engine without a model-length limit.

--enable-prefix-caching
booleanDefaults to true

Enable prefix caching. Pass --no-enable-prefix-caching to disable.

--kv-cache-dtype
stringDefaults to auto

KV cache dtype for the bytes-per-token computation.

--kv-bytes-per-token
integerDefaults to auto-computed

KV cache bytes per token. Overrides the auto-computation.

Scheduling

--max-num-seqs
integerDefaults to 256

Maximum concurrent sequences.

--max-num-batched-tokens
integerDefaults to 8192

Maximum tokens per batch.

--enable-chunked-prefill
booleanDefaults to true

Enable chunked prefill. Pass --no-enable-chunked-prefill to disable.

--preemption-mode
stringDefaults to lifo

Decode eviction policy under memory pressure. lifo is vLLM v1 style.

Allowed values: lifo fifo

Timing

--speedup-ratio
floatDefaults to 1.0

Timing speedup factor applied to simulated prefill and decode durations.

--decode-speedup-ratio
floatDefaults to 1.0

Decode-only speedup multiplier, for example for Eagle speculation.

--startup-time
floatDefaults to null

Simulated startup delay, in seconds.

Data parallelism and workers

--data-parallel-size
integerDefaults to 1

Number of DP replicas.

--num-workers
integerDefaults to 1

Workers per process. Prefer this over launching many separate mocker processes: all workers share one tokio runtime and thread pool.

--stagger-delay
floatDefaults to -1 (auto)

Delay between worker launches, in seconds. 0 disables; -1 enables auto mode.

Performance modeling

--planner-profile-data
pathDefaults to null

Path to either a mocker-format .npz file or a profiler results directory.

--reasoning
JSON stringDefaults to null

JSON config for emitting reasoning token spans, with start_thinking_token_id, end_thinking_token_id, and thinking_ratio.

--response-replay-trace-path
pathDefaults to null

Mooncake JSONL trace whose output_token_ids provide response replay annotations.

AIC performance model

Opt-in flags for the AIConfigurator (AIC) latency model. Live Mocker workers do not use AIC by default. For the timing-model design, see Mocker Engine Architecture.

--aic-perf-model
booleanDefaults to false

Use the AIC compatibility API in the AISimulate wheel for latency prediction instead of the interpolated or polynomial models. Install aisimulate and use a supported system/backend/version tuple.

--aic-system
stringDefaults to h200_sxm when AIC is enabled

AIC system name used with --aic-perf-model. The raw CLI value is unset when omitted; runtime resolution uses h200_sxm when AIC modeling is enabled.

--aic-backend
stringDefaults to --engine-type

Backend used for AIC performance-data lookup. Set it only to model timing for a different backend than the simulated scheduler.

Allowed values: vllm sglang trtllm
--aic-backend-version
stringDefaults to auto

AIC backend engine version, for example 0.12.0 for vLLM. When unset, uses the default version for the backend.

--aic-tp-size
integerDefaults to 1

Tensor-parallel size for AIC latency prediction. Affects only AIC performance-model lookups, not mocker scheduling.

--aic-moe-tp-size
integerDefaults to null

Mixture-of-Experts tensor-parallel size for AIC latency prediction. Required by some MoE models.

--aic-moe-ep-size
integerDefaults to null

Mixture-of-Experts expert-parallel size for AIC latency prediction. Required by some MoE models.

--aic-attention-dp-size
integerDefaults to null

Attention data-parallel size for AIC latency prediction. Required by some MoE models.

--gpu-memory-utilization
floatDefaults to 0.9

vLLM GPU memory fraction used for AIC KV-capacity estimation.

--mem-fraction-static
floatDefaults to 0.88

SGLang static memory fraction used for AIC KV-capacity estimation.

--free-gpu-memory-fraction
floatDefaults to 0.9

TensorRT-LLM fraction of post-model-load free GPU memory used for AIC KV-capacity estimation.

--aic-nextn
integerDefaults to null

Experimental Multi-Token Prediction (MTP) draft length, from 1 through 5.

--aic-nextn-accept-rates
stringDefaults to null

Experimental comma-separated conditional MTP acceptance rates.

--aic-mtp-seed
integerDefaults to 42

Base random seed for Mocker MTP burst sampling.

Disaggregation

--disaggregation-mode
stringDefaults to agg

Worker mode.

Allowed values: agg prefill decode
--is-prefill-worker
booleanDefaults to false

Deprecated alias for --disaggregation-mode=prefill. Do not combine it with --disaggregation-mode or --is-decode-worker.

--is-decode-worker
booleanDefaults to false

Deprecated alias for --disaggregation-mode=decode. Do not combine it with --disaggregation-mode or --is-prefill-worker.

--bootstrap-ports
stringDefaults to null

Comma-separated rendezvous base ports, one per worker in disaggregated mode.

--kv-transfer-bandwidth
floatDefaults to 64.0

KV cache transfer bandwidth in GB/s. Set to 0 to disable.

--kv-transfer-timing-mode
stringDefaults to full_prompt

Prompt footprint charged to a coordinated prefill/decode transfer.

Allowed values: full_prompt destination_missing

Event and request transport

--event-plane
stringDefaults to auto

Event transport. When the environment does not set a value, Mocker uses ZMQ with file or memory discovery and NATS with etcd or Kubernetes discovery.

Allowed values: nats zmq
--request-plane
stringDefaults to env-driven (tcp)

Request transport.

Allowed values: nats tcp
--discovery-backend
stringDefaults to env-driven (etcd)

Discovery backend.

Allowed values: kubernetes etcd file mem
--zmq-kv-events-ports
stringDefaults to null

Comma-separated ZMQ PUB base ports for KV event publishing, one per worker.

--zmq-replay-ports
stringDefaults to null

Comma-separated ZMQ ROUTER base ports for gap recovery, one per worker.

SGLang-specific

Apply only when --engine-type sglang.

--sglang-schedule-policy
stringDefaults to fifo / fcfs

SGLang scheduling policy. fifo/fcfs is the default; lpm is longest prefix match.

Allowed values: fifo fcfs lpm
--sglang-page-size
integerDefaults to 1

SGLang radix-cache page size in tokens. Also becomes the effective block size when --engine-type sglang and --block-size is omitted.

--sglang-max-prefill-tokens
integerDefaults to 16384

SGLang max prefill-token budget per batch.

--sglang-chunked-prefill-size
integerDefaults to 8192

SGLang chunked-prefill chunk size.

--sglang-clip-max-new-tokens
integerDefaults to 4096

SGLang admission-budget cap for max new tokens.

--sglang-schedule-conservativeness
floatDefaults to 1.0

SGLang schedule conservativeness factor.

TensorRT-LLM-specific

Apply only when --engine-type trtllm.

--trtllm-capacity-scheduler-policy
stringDefaults to guaranteed_no_evict

TensorRT-LLM capacity scheduler policy. The Mocker currently supports only guaranteed_no_evict.

Router advertisement

Mocker accepts the same --router-* worker-advertisement options as the real backend launchers. Use them to override Router behavior for this worker set. See Router Configuration and Tuning for the shared fields.

--router-mode
stringDefaults to inherit frontend

Advertise a Router configuration for this worker set. When omitted, the worker advertises no Router configuration and inherits the Frontend configuration.

Allowed values: round-robin random power-of-two kv direct least-loaded device-aware-weighted

Environment variables

VariableDefaultDescription
DYN_MOCKER_KV_CACHE_TRACEoffSet to 1 or true to log structured native KV-cache allocation and eviction traces.