Numerics
Use this reference to look up numerical contracts and the individual switches that control reproducibility, reduction order, and logprob computation.
--numerics names the numerical contract a deployment promises. For more information about the design and the per-model verification gate, see Numerics envelopes. Every switch that an envelope folds is also available individually under auto.
Numerical contract
--numerics envelope
Syntax: --numerics {auto,rl-bitwise}. The default is auto. Plugins can register additional envelopes.
autouses each option's default.rl-bitwisefolds the determinism switches (--batch-invariant-collectives,--disable-autotune,--disable-tf32,--disable-pdl, no fused all-reduce, batch-invariant MoE planning,--sampling-stream per-request, and--dsa-slot-order selection) so tokens and logprobs are bitwise identical across runs and batch compositions within one deployment with a fixed world size, parallel layout, model, and kernels. It also folds the trainer-operation-order switches documented on this page so a teacher-forced pass reproduces the RL trainer's logprobs.
A model serves rl-bitwise only when its profile lists it. The standard RL policy requires an unquantized checkpoint, MoE TP 1, and a vocabulary that is a multiple of 32768. A registered model policy can define different checkpoint-storage and vocabulary requirements. Shared launch constraints still apply; for example, slot-order MoE combine requires MoE TP 1.
Startup and kernel selection
--disable-autotune flag
Disables startup FlashInfer tactic profiling. Matching caches still load, and uncovered shapes use the library's heuristic fallback. CuTe warmup continues except under pipeline parallelism. PrimTS skips extra group enumeration.
By default, startup tactic profiling is enabled. rl-bitwise enables this flag.
--enable-startup-requests flag
Before reporting ready, the engine serves its own requests through the ordinary serving path. It sizes the following requests from the server's limits and serves them in order:
- One one-token request.
- One request each of a thirty-second of a prefill chunk, a sixteenth, one token more than a sixteenth, and three sixteenths.
- One request of a full prefill chunk.
- A full batch.
The first client requests then compile nothing that this path reaches. This flag is not supported with --disaggregation-mode, --kvstore-storage-backend, or --shared-l2-config. It is off by default. For more information, see Startup requests.
Run and batch invariance
--batch-invariant-collectives flag
Uses one association order per reduction, independent of the batch. Where a trtllm workspace is armed, its kernels perform a fixed-rank-order fp32 fold. Otherwise, the reduction uses data movement plus the fold; an all-reduce on this path costs world_size times the traffic. Gathers keep the multicast kernels. This flag also disables fused all-reduce+norm.
This flag is off by default. rl-bitwise folds it in.
--force-deterministic-rsag flag
Uses NCCL and the fold only: no symmetric-memory path, including multicast gathers, the trtllm/Triton all-reduce tiers, and distributed argmax. Without --batch-invariant-collectives, reductions use NCCL; with it, they use the fold.
This flag is off by default, and rl-bitwise does not fold it in. Under rl-bitwise, it only moves the gathers to NCCL.
--sampling-stream option
Syntax: --sampling-stream {batch,per-request}. The default is batch.
batchkeys FlashInfer's Philox stream by the batch row, so a request's draw depends on its co-batch.per-requestdraws every non-greedy row from a stream keyed by the request's seed and position only, so a request samples the same tokens alone and inside any batch.
rl-bitwise folds this option to per-request.
Trainer operation order
The following switches select between the engine's default operation order and the trainer's operation order. rl-bitwise selects the trainer's form.
--yarn-ramp-mask-device option
Syntax: --yarn-ramp-mask-device {cuda,cpu}.
Selects the device that computes the deepseek_yarn linear ramp mask. The default is cuda, independently of the frequency device. rl-bitwise folds this option to cpu.
--yarn-frequency-device option
Syntax: --yarn-frequency-device {cuda,cpu}.
Selects the device that computes YaRN powers, divisions, and interpolation. The default is cuda, independently of the ramp device. rl-bitwise folds this option to cuda, overriding an explicit cpu, and pairs it with the CPU ramp.
--mla-lora-scale option
Syntax: --mla-lora-scale {folded,runtime}. The default is folded.
Selects where LongCat-style MLA applies its sqrt(hidden / lora_rank) norm scales:
foldedfolds the scales into the norm weights at load.runtimemultiplies the scales at runtime afterq_b_projandkv_a_layernorm, as the trainer does.
rl-bitwise folds this option to runtime.
--layer-boundary-norm option
Syntax: --layer-boundary-norm {fused,unfused}. The default is fused.
unfused materializes hidden + residual in bf16 before the norm that opens each physical layer and before the final norm, instead of using the fused add+norm kernel. It also vetoes all-reduce+norm fusion. rl-bitwise folds this option to unfused.
--router-topk option
Syntax: --router-topk {fused,torch}. The default is fused.
Selects the correction-bias MoE routing implementation:
fuseduses the fused CUDA kernel.torchuses fp32torch.softmaxandtorch.topk(probs + bias)with PyTorch tie order and-1zero-expert ids.
rl-bitwise folds this option to torch.
--logprob-order option
Syntax: --logprob-order {torch,blockwise,blockwise-direct,blockwise-16384,blockwise-direct-16384}. The default is torch.
Selects the order of the selected-token log-softmax. Output and prompt (input) logprobs share the selected operation.
torchusestorch.log_softmax.blockwiseuses fixed-width blockwise reduction over 32768-wide vocabulary blocks and returns negative cross-entropy.blockwise-directuses the same reduction with direct subtraction.- The
-16384variants select 16384-wide blocks independently of serving TP.
This option changes logprobs only. rl-bitwise folds it to blockwise, overriding explicit torch and preserving an explicit blockwise form and block width.
--dsa-slot-order option
Syntax: --dsa-slot-order {selection,sorted}. The default is selection.
Selects the order in which sparse (DSA) attention reduces a token's selected KV rows:
selectionuses the order emitted by the top-k leaf.sorteduses ascending position order: one reduction order per selected set, invariant across batch compositions, runs, and engines. This is not ascending slot order, which follows page placement.
The top-k leaf emits the order and the attention core preserves it, so both must declare the slot_order trait (registered batch-invariant leaves). Under sorted, a kernel that does not declare the trait is refused. rl-bitwise fixes this option to selection, overriding an explicit sorted. Both top-k and attention leaves must still be batch-invariant under rl-bitwise.
--moe-combine-order option
Syntax: --moe-combine-order {rank,slot}. The default is rank.
Selects how a token's routed-expert contributions meet across the MoE TP-EP group:
rank: the MoE kernel returns this rank's partial and the host sums the partials, adding LongCat's identity zero-expert residual once around the reduction.slot: the MoE kernel folds the token's top-k slots in fp32 slot order across the EP group itself, residual included, as the trainer's grouped MLP does, and the host reduces nothing. This choice needs MoE TP 1 and a kernel declaringcombine_orderwithslot(a registered batch-invariant leaf). It also vetoes all-reduce+norm fusion.
rl-bitwise folds this option to slot.