Environment variables#
Every INFERASIM_* variable the simulator reads, grouped by what it affects.
Nearly all of them have a CLI flag that wins over the env var; the env form
exists so a host can be configured once instead of every command being
decorated. The serving stack’s own variables are a separate list — see
Environment variables in the reference section.
Tip
Only one of these belongs in a normal setup: INFERASIM_ANCHOR_STORE. Point it
at a directory of harvested anchors and the measured default is satisfied
without a GPU. Everything else on this page is tuning or diagnosis.
Anchors and model resolution#
Env |
Default |
What it does |
|---|---|---|
|
(unset) |
Directory of anchors indexed by regime signature. A run looks here for a match before deciding it needs to measure. Flag: |
|
(unset) |
Skip the check that the anchor’s model matches the target’s. Off by default because an anchor describes the checkpoint it measured; set it only when you know two ids name the same weights. |
|
(unset) |
Checkpoint to serve while measuring. Flag: |
|
(unset) |
Preset spelling ( |
|
(walk up to |
Project root the tuning agent resolves configs against. Useful when a workload YAML lives outside the tree. |
Harvesting an anchor#
Env |
Default |
What it does |
|---|---|---|
|
(unset) |
Cache directory for |
|
|
Engine the harness launches. Flag: |
|
(unset) |
Engine flags a checkpoint needs before it will load at all — a remote-code architecture, a non-default attention backend. Flag: |
|
(unset) |
Fall back to RCCL all-reduce. Custom all-reduce allocates an IPC shared buffer that can fail on some ROCm GPU-subset topologies — a 4-GPU subset while another tenant holds a GPU, for instance. |
|
|
Warmup iterations before timing. |
|
|
Timed iterations per measurement. |
|
|
How repeated timings collapse to one number. Median by default so one slow first iteration — a JIT compile warmup missed — does not poison the result; |
|
|
MoE kernel padding patch during benches. |
|
|
Time the MoE layer as a whole instead of per-module. |
The tuning agent has its own artifact-reuse variables, because it scores
thousands of candidates and must not measure per candidate:
INFERASIM_INFER_BENCH_CACHE (directory of <model>_tp{tp}_pp{pp}_ep{ep}.json
artifacts), INFERASIM_INFER_BENCH_ARTIFACT (one forced artifact), and
INFERASIM_INFER_BENCH_CACHE_ONLY (mark a trial illegal rather than fall back
to measuring when no artifact matches). See Tuning agent.
Restoring a measurement to another shape#
Env |
Default |
What it does |
|---|---|---|
|
|
How a measured anchor is extrapolated to another TP. |
Analytical backend#
These matter on the simulate path and inside restoration, where the simulator
supplies the ratio between two shapes.
Env |
Default |
What it does |
|---|---|---|
|
(auto) |
GEMM simulation backend to construct. |
|
(probe the local device) |
Hardware profile to model, e.g. |
|
(profile default) |
Clock override. Resolution is CLI, then env, then the profile. |
|
|
Which local device to read a hardware profile from when no arch is named. |
Collective cost model#
The defaults here are measured constants, not preferences. vLLM dispatches small
decode messages to its own one-shot/two-shot all-reduce rather than RCCL, so
charging RCCL’s latency put a flat, batch-independent and TP-independent
overhead into every decode step. The two ceilings exist for the opposite
failure: a prefill message is tokens × hidden, hundreds of times larger than
anything the small-message fit was measured over, and applying that fit there
charged more communication than the whole step cost.
Env |
Default |
What it does |
|---|---|---|
|
|
Fixed per-all-reduce overhead. |
|
|
Fixed per-all-to-all overhead. |
|
|
Above this message size the measured small-message all-reduce fit is abandoned for the analytical bandwidth model — matching where vLLM itself stops using its custom kernel. |
|
|
The same ceiling for expert-parallel all-to-all. |
MoE modelling#
Env |
Default |
What it does |
|---|---|---|
|
|
Which expert-GEMM kernel model to price with. Serving projections should use |
|
|
Apply expert-load imbalance inside the roofline, per parallel view. |
|
|
Use a per-view imbalance for the benchmark and target views. |
|
|
Zipf skew for the injected benchmark routing strategy. Flag: |
|
|
Rows of pre-drawn routing assignments, so a timed decode step pays a gather rather than sampling. Floored at |
Diagnostics#
Each of these prints and changes nothing else.
Env |
What it prints |
|---|---|
|
Per-component split of a projected step — attention, MLP, quantisation. |
|
Every mixed step the DES prices, with its decode count, prefill tokens, and context buckets. |
|
The floor-preserving TP restoration applied to each measured decode point. |