Mocker CLI Reference
Command-line flags for live Mocker workers
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
Print the Dynamo Mocker version and exit.
Hugging Face model ID or local path for the tokenizer. Set this for normal frontend requests.
Model name used in API responses.
Dynamo endpoint string. Defaults are namespace-dependent, and prefill workers use a different default endpoint than aggregated or decode workers.
Engine simulation type.
Allowed values: vllm sglang trtllmPath to a JSON file with canonical AISimulate launch configuration and optional dynamo runtime options.
Engine fields belong under engine. This file overrides individual CLI arguments; see
Canonical Python Engine Configuration.
KV cache
Usable KV cache blocks per data-parallel rank. Non-AIS timing defaults to 16,384 blocks; AIS timing estimates capacity when this option is omitted.
Tokens per KV cache block. Defaults are 64 for vLLM, 1 for SGLang, and 32 for TensorRT-LLM.
Maximum sequence length, including prompt and generated tokens. Omitting the option leaves the simulated engine without a model-length limit.
Enable prefix caching. Pass --no-enable-prefix-caching to disable.
KV cache dtype for the bytes-per-token computation.
KV cache bytes per token. Overrides the auto-computation.
Native G2 host offload
The vLLM mocker can simulate framework-native G1-to-host (G2) KV offload. Offloaded blocks are
restored from host memory on a later prefix hit. As with the native vLLM offloading connector, G2
residency is published as HostPinned (CPU-medium) KV events alongside device events, so the KV
router can credit a host-resident prefix with host_cache_hit_weight and route to the worker that
holds it. Host offload requires --engine-type vllm and prefix caching. Host blocks are sized by
--kv-bytes-per-token.
G2 events are not published on the vLLM ZMQ wire (--zmq-kv-events-ports), which needs per-block
token IDs that the simulated G2 does not carry; a router consuming that stream sees only G1.
Enable native G2 host offload with this host cache capacity per data-parallel rank, in blocks.
Per-rank device-to-host bandwidth in decimal GB/s. 0 is unlimited. Requires --num-host-blocks.
Per-rank host-to-device bandwidth in decimal GB/s. 0 is unlimited. Requires --num-host-blocks.
Offline replay can also simulate one G2 pool shared by every worker of the simulated deployment. Live mocker workers reject this scope, so pass it through the offline replay Python API:
Offline replay does not compute bytes per token from a model, so set engine.kv_cache_bytes_per_token
explicitly. engine.native_host_offload also accepts
latency_to_first_byte_ms and the shared-pool bandwidth caps. G2 host offload does not support
MTP (--ais-nextn).
Scheduling
Maximum concurrent sequences.
Maximum tokens per batch.
Enable chunked prefill. Pass --no-enable-chunked-prefill to disable.
Decode eviction policy under memory pressure. lifo is vLLM v1 style.
A vLLM engine models async scheduling by default, except with MTP and native host offload, where
it keeps synchronous scheduling: a busy engine keeps its next batch committed, so a request that
arrives while the engine is busy is admitted up to two passes later than with synchronous
scheduling. A request that arrives at an idle engine is not delayed. To model
synchronous scheduling (--no-async-scheduling in vLLM), set engine.async_scheduling to false
in the --extra-engine-args file. SGLang and TensorRT-LLM engines reject the setting. The file
replaces the engine flags and the command line’s default dynamo.enable_local_indexer: true, so a
file that changes only the scheduling of a default Mocker is:
Timing
Timing speedup factor applied to simulated prefill and decode durations.
Decode-only speedup multiplier, for example for Eagle speculation.
Simulated startup delay, in seconds.
Data parallelism and workers
Number of DP replicas.
Workers per process. Prefer this over launching many separate mocker processes: all workers share one tokio runtime and thread pool.
Delay between worker launches, in seconds. 0 disables staggering (default); -1 enables auto mode.
Performance modeling
Path to either a mocker-format .npz file with timing lookup tables or a profiler results
directory. With a directory, the mocker tunes an AIS perf model with the measured points when it
starts; see Profiler results directory. Cannot be combined with
--ais-perf-model VALUE or DYN_AIS_PERF_MODEL; see
AIS performance model.
JSON config for emitting reasoning token spans, with start_thinking_token_id,
end_thinking_token_id, and thinking_ratio.
Mooncake JSONL trace whose output_token_ids provide response replay annotations.
AIS performance model
Opt-in flags for the AISimulate (AIS) latency model. Live Mocker workers do not use AIS by default. For the timing-model design, see Mocker Engine Architecture.
Use the AISimulate perf model for latency prediction instead of the interpolated or polynomial
models. The value is one perf model config, or a list of configs with one worker_type each.
Available since v1.8. Write it as a path to a YAML or JSON file, or as inline JSON (text that
starts with { or [):
The mocker uses the config of its own worker type: aggregated, prefill or decode, as set
by --disaggregation-mode. One config without worker_type fits every worker type. The config
names model, system and backend itself; --model-path and --engine-type do not change
it. For the keys of a config, see
Unified perf-model input
in the AISimulate documentation. Install aisim and use a supported
system/backend/version tuple.
--ais-nextn, --ais-nextn-accept-rates and --ais-mtp-seed can be combined with the value.
--ais-nextn sets nextn in the config; a config that writes a different nextn is an error.
With --extra-engine-args, the file gives the worker type and the value sets
engine.timing_model. A file that sets engine.timing_model itself is an error:
--extra-engine-args already sets engine.timing_model; it cannot be combined with --ais-perf-model.
DYN_AIS_PERF_MODEL holds the same value. When the flag is not given, the variable turns on AIS
timing for every mocker that has it in its environment.
The value cannot be combined with --planner-profile-data, because a mocker has one timing
provider. The mocker exits when it reads its arguments, before it looks up the model:
--ais-perf-model cannot be combined with --planner-profile-data, or
DYN_AIS_PERF_MODEL cannot be combined with --planner-profile-data when the value comes from
the variable. To keep profile data timing on a mocker whose environment sets the variable, set
DYN_AIS_PERF_MODEL to an empty value for that mocker; an empty value counts as not set. With
--extra-engine-args the profile data is not used for timing, so the combination is accepted.
Profiler results directory
A profiler results directory holds the prefill and decode points that the profiler’s thorough mode
measured: selected_prefill_interpolation/raw_data.npz and
selected_decode_interpolation/raw_data.npz, or prefill_raw_data.json and
decode_raw_data.json.
When it starts, the mocker tunes an AISimulate fpm_regression model with the measured points, as
the Planner reads the same directory, and uses it as its AIS perf model. The model records
--model-path as the model name (the name of the directory when the flag is not given),
--engine-type as the backend and --ais-nextn as the speculative decoding depth. The hardware
and the parallelism are recorded as unknown. Each phase needs at least five measured points; with
fewer, or with points that do not allow a fit, the mocker does not start. A deprecated AIS input
next to the directory is an error: choose one timing provider: AIS or planner_profile_data.
With --extra-engine-args the directory is not used for timing.
To keep the tuned models, or to give them to the Python replay API as ais_perf_model=, write
them to a directory that does not exist yet:
OUTPUT_DIR gets one saved model for each worker type (prefill, decode, aggregated) and
ais_perf_model.json, which names the three, so a mocker of any worker type takes the same file.
--backend (default vllm) and --nextn (default 0) set what the mocker takes from
--engine-type and --ais-nextn. The saved models are tied to the AISimulate version that wrote
them; write them with the Dynamo release that reads them.
Since v1.8 the directory is read this way. Earlier releases fitted one line to the prefill points and one plane to the decode points and built lookup tables from them. Timing differs from those lookup tables:
- Prefill time depends on the number of requests in the batch and on their cached prefix, not
only on the total of new tokens, and it is not a straight line in the input length. For the
profile
H200_TP1P_TP1Din the repository, one request of 100 input tokens takes 18.0 ms (measured 19.5 ms; the lookup table gave 0.6 ms) and one of 8,000 takes 164.9 ms (lookup table 175.3 ms). - Decode time for the same profile is within 2.5% of the lookup table for contexts of 350 tokens and more, the range that was profiled, and within 0.3% from 1,000 tokens. For shorter contexts the lookup table was higher, because it interpolated between a context of 1 token and the next grid point: 64 requests with 50 tokens each take 7.5 ms, and took 48.2 ms through the lookup table.
- A mocker without
--num-gpu-blocks-overridetakes its KV capacity from the profiled decode engine (max_kv_tokensof the decode data) instead of the default of 16,384 blocks.
The inputs below are deprecated. They still work and print one warning that names the inputs in
use, for example
--ais-perf-model without a value, --ais-backend and --ais-system are deprecated and will be removed in v1.9; use --ais-perf-model VALUE.
A deprecated input together with --ais-perf-model VALUE or DYN_AIS_PERF_MODEL is an error, for
example --ais-perf-model cannot be combined with --ais-system. The --aic-* spellings of the
flat flags are deprecated with them.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Switch form of the flag. It builds the perf model from --model-path, --engine-type and the
flat --ais-* flags below. --aic-perf-model is the older spelling of the switch and takes no
value: --aic-perf-model takes no value; write --ais-perf-model VALUE. The switch cannot be
combined with DYN_AIS_PERF_MODEL:
--ais-perf-model without a value cannot be combined with DYN_AIS_PERF_MODEL.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Complete AISimulate ForwardPassPerfModelConfig, including immutable worker role,
data roots, selection policy and nested estimator controls. Defaults to
estimation_mode: auto and fallback_policy: deny. Do not combine this input
with flat AIS identity flags. Cold regression is rejected by Router and Mocker.
Mocker and Dynamo Replay require pp: 1; pipeline-parallel configurations are rejected.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
AIS system name used with the deprecated switch. The raw CLI value is unset when omitted; runtime
resolution uses h200_sxm when AIS modeling is enabled.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Backend used for AIS performance-data lookup. Set it only to model timing for a different backend than the simulated scheduler.
Allowed values: vllm sglang trtllmDeprecated. Use --ais-perf-model VALUE. Removed in v1.9.
AIS performance-database version. Use current, previous, or next when the slot is available
for the selected system and backend, or specify a version assigned to one of those slots.
When unset, uses the release database’s current slot.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Tensor-parallel size for AIS latency prediction. Affects only AIS performance-model lookups, not mocker scheduling.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Mixture-of-Experts tensor-parallel size for AIS latency prediction. Required by some MoE models.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Mixture-of-Experts expert-parallel size for AIS latency prediction. Required by some MoE models.
Deprecated. Use --ais-perf-model VALUE. Removed in v1.9.
Attention data-parallel size for AIS latency prediction. Required by some MoE models.
vLLM GPU memory fraction used for AIS KV-capacity estimation.
SGLang static memory fraction used for AIS KV-capacity estimation.
TensorRT-LLM fraction of post-model-load free GPU memory used for AIS KV-capacity estimation.
Experimental Multi-Token Prediction (MTP) draft length, from 1 through 5.
Experimental comma-separated conditional MTP acceptance rates.
Base random seed for Mocker MTP burst sampling.
Disaggregation
Worker mode.
Allowed values: agg prefill decodeDeprecated alias for --disaggregation-mode=prefill. Do not combine it with
--disaggregation-mode or --is-decode-worker.
Deprecated alias for --disaggregation-mode=decode. Do not combine it with
--disaggregation-mode or --is-prefill-worker.
Comma-separated rendezvous base ports, one per worker in disaggregated mode.
KV cache transfer bandwidth in GB/s. Set to 0 to disable.
Prompt footprint charged to a coordinated prefill/decode transfer.
Allowed values: full_prompt destination_missingEvent and request transport
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 zmqRequest transport.
Allowed values: nats tcpDiscovery backend.
Allowed values: kubernetes etcd file memComma-separated ZMQ PUB base ports for KV event publishing, one per worker.
Comma-separated ZMQ ROUTER base ports for gap recovery, one per worker.
SGLang-specific
Apply only when --engine-type sglang. Set the radix-cache page size with --block-size.
The SGLang scheduler keeps one token of the context for itself, admits a prompt only when more
than five further tokens stay free, and caps the output by the free KV capacity. A decode worker
reserves 512 tokens for each handoff and keeps no prefix cache. To change these two defaults, set
engine.sglang.num_reserved_decode_tokens or
engine.sglang.disaggregation_decode_enable_radix_cache in the --extra-engine-args file. That
file replaces the engine flags, so it also names the backend and the worker role. Without
engine.backend the engine is vLLM and the SGLang settings have no effect.
SGLang scheduling policy. fifo is the default; lpm is longest prefix match.
The deprecated fcfs alias maps to fifo and prints a warning when used.
Deprecated alias for --block-size when --engine-type sglang. Prints a warning when used;
other backends ignore it. If both flags are supplied for SGLang, their values must match.
Both aliases are deprecated in Dynamo 1.6.0 and will be removed in Dynamo 1.8.0, after two
releases. Use --sglang-schedule-policy fifo and --block-size instead.
SGLang max prefill-token budget per batch.
SGLang chunked-prefill chunk size.
SGLang admission-budget cap for max new tokens.
SGLang schedule conservativeness factor.
TensorRT-LLM-specific
Apply only when --engine-type trtllm.
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.
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 kv direct least-loaded device-aware-weighted