← Back to Papers & Experiments

Worker vs. Verifier Latency Benchmark Report

Single-request latency for worker generation against verifier prefill, measured twice: Qwen3-8B on one RTX 4090 and Qwen3-32B on one H100 NVL. 96 input x output combinations in total, covering per-token decode cost, prefill throughput and the worker/verifier cost ratio.

CitationThese experiments, figures and data files are published by the TrueOpen.ai team. When citing or redistributing them, in whole or in part, state that the source is the TrueOpen.ai team and link to www.trueopen.ai. The same requirement is repeated in the download bundle's README, in CITATION.txt, and in the header of every CSV file.

This report is based on the timing results from tools/vllm_worker_verify_pipeline/benchmark_worker_verifier_latency.py. It quantifies the time-cost gap between the two paths and analyzes how input / output length affects that gap. Two runs are covered here — a smaller model on a consumer GPU and a larger model on a datacenter GPU — to show that the conclusion holds across model size and hardware. The collected data lives under experiments/worker-verifier-latency/data/qwen3_8b/ and experiments/worker-verifier-latency/data/qwen3_32b/.

  • Script: tools/vllm_worker_verify_pipeline/benchmark_worker_verifier_latency.py
  • Models / hardware:
  • Qwen3-8B — single RTX 4090, vllm==0.29.0
  • Qwen3-32B — single H100 NVL, vllm==0.29.0
  • Common config: quant=bf16, dtype=bfloat16, tensor_parallel_size=1
  • Sampling: top_k logprobs = 20, warmup=2, repeats=5, batch=1
  • Backend: vLLM offline LLM class (in-process, V1 EngineCore)

Both paths share a single vllm.LLM instance (same model, same GPU state):

  • worker: normal generation, prefill(input) + decode(output_len), SamplingParams(max_tokens=output_len, logprobs=20); output length is pinned exactly via ignore_eos + min_tokens.
  • verifier: a single prefill over the worker's input_ids + output_ids to recover per-position top-k logprobs, SamplingParams(max_tokens=1, prompt_logprobs=20).

1. Executive Summary

Core conclusion: the verifier's cost is far below the worker's generation cost — in typical multi-token output scenarios, verifying a full generation takes only about 1% of the cost to produce it (worker/verifier ≈ 80×–117×). This holds for both Qwen3-8B (RTX 4090) and Qwen3-32B (H100 NVL), i.e. it is robust to model size and hardware. This is direct evidence that the worker/verifier protocol is viable in terms of time cost.

The gap stems from the fundamentally different nature of the two paths. The worker spends nearly all its time on serial decode, emitting tokens one at a time — ~17.5 ms/token for the 8B on a 4090, and ~22.7 ms/token for the 32B on an H100 NVL — essentially independent of input length. The verifier performs a single parallel prefill, computing all positions of input+output at once at several thousand tok/s. The ~two-orders-of-magnitude efficiency gap between serial decode and parallel prefill is the source of the cost difference. Consequently, the longer the output, the worse the worker fares and the more favorable verification becomes: the ratio peaks around 100×–117× when output is large.

Notably, the 32B model is only ~30% slower per decode token than the 8B despite being ~4× larger, because the H100 NVL's much higher memory bandwidth largely offsets the extra weight traffic. The verifier's parallel prefill throughput is comparable across the two setups, so the overall worker/verifier ratio lands in the same band.

The only exception is when the output is extremely short (=1), where the verifier is actually slightly slower (ratio 0.62–0.90) — it must compute top-k logprobs at every position, and that fixed overhead slightly outweighs the tiny decode savings. This is a corner case and does not affect the main conclusion.

2. Worker Cost Model: Output-Dominated, Serial Decode

With input fixed at 128, worker time scales almost perfectly linearly with output, and the per-token cost holds steady — ~17.5 ms for the 8B, ~22.7 ms for the 32B:

output8B worker med (s)8B per token (ms)32B worker med (s)32B per token (ms)
102417.6317.223.1322.6
204835.4017.346.3322.6
409671.4917.593.0922.7
8192145.7717.8187.6622.9

Input has little effect on the worker — with output fixed at 1024, growing input from 128 to 8192 raises worker time by only ~10–12%:

input8B worker med (s) @ out=102432B worker med (s) @ out=1024
12817.6323.13
51217.7123.21
102417.8323.43
204818.1423.67
409618.7624.22
819219.8025.44

The pure prefill cost can be read approximately from the output=1 rows (8B: input=8192 / out=1 → 0.886s; 32B: input=8192 / out=1 → 1.428s).

Conclusion: worker cost ≈ output_len × (per-token decode cost), consistent with decode being serial and memory-bandwidth-bound. The larger model pays more per token, but only modestly, thanks to the faster GPU's bandwidth.

3. Verifier Cost Model: Total-Dominated, Parallel Prefill

The verifier is a single prefill; its time scales linearly with total (input+output). Effective throughput is a few thousand tok/s for both setups:

total8B verifier med (s)8B tok/s32B verifier med (s)32B tok/s
1290.033(fixed overhead)0.038(fixed overhead)
11520.170~68000.221~5200
83201.488~56001.924~4325
163843.129~52404.038~4057

Conclusion: verifier cost ≈ total_tokens / (a few thousand tok/s) + fixed overhead. Prefill computes all positions in one parallel pass, making it two orders of magnitude faster than serial decode. The 32B verifier is only moderately slower than the 8B's despite the larger weights, again because the H100 NVL absorbs the extra bandwidth demand.

4. Key Metric: Worker/Verifier Cost Ratio

This is the most valuable output of the experiment. The ratio grows sharply with output before flattening. Representative scenarios for both models:

Scenario (input/output)8B ratio32B ratio
512 / 102481.5×85.7×
128 / 2048113.6×73.6× ¹
2048 / 409689.2×66.9×
1024 / 4096104.6×96.0×
128 / 409684.4×117.1×

¹ The 32B 128/2048 cell is a noisy outlier: its verifier median (0.630s) sits above the mean (0.559s) and even the p10 (0.424s), so the ratio there is depressed by verifier-side jitter rather than a real effect.

4.1 Qwen3-8B (RTX 4090) — full ratio matrix

output →116642561024204840968192
input=1280.828.3626.2770.10103.78113.5684.4597.99
input=5120.653.6713.2039.3581.5199.8476.7197.24
input=10240.642.477.3325.0262.4584.70104.6292.44
input=20480.701.594.3914.6042.7864.1589.1882.83
input=40960.781.201.908.3319.5846.3851.7662.43
input=81920.620.811.403.8812.1921.1636.6550.13

4.2 Qwen3-32B (H100 NVL) — full ratio matrix

output →116642561024204840968192
input=1280.909.6730.0675.97104.7973.59 ¹117.0597.56
input=5120.894.2713.9342.3185.6998.90106.3696.07
input=10240.812.717.5124.5262.3882.4395.9690.47
input=20480.891.784.1414.4441.3848.1566.9081.38
input=40960.671.332.646.0620.1033.7352.0568.58
input=81920.800.971.523.8611.8821.1434.7848.49

How to read the tables (both matrices show the same structure):

  • The output=1 column is entirely < 1: the verifier is slightly slower than the worker due to the per-position logprobs overhead.
  • Each row rises monotonically with output: the longer the output, the more cost-effective verification becomes.
  • Each column decreases as input grows: with longer input, the verifier must pay for the extra input-segment prefill, narrowing the ratio.
  • For a fixed input the ratio rises then flattens/dips slightly: when output ≫ input, the verifier's total ≈ output also scales ∝ output, so the ratio asymptotes to (per-token decode) / (per-token prefill) ≈ 90–110×.
  • The two models track each other closely: same shape, same magnitude, peaks in the 100×–117× range. The worker/verifier advantage is not an artifact of one particular model or GPU.

5. Notes and Limitations

  • The TTFT / decode split columns are empty (-). Both runs used the vLLM V1 engine (the EngineCore in the logs), which does not expose the legacy RequestMetrics.first_token_time, so the script cannot separate TTFT from decode. This does not affect the total timings or any conclusion above; for a prefill approximation, use the output=1 rows.
  • This is single-request latency at batch=1. In real online serving, the worker amortizes per-token cost via continuous batching, and the verifier can verify in batches, so absolute numbers will change. However, the fundamental difference between prefill (parallel) and decode (serial) remains, so the order-of-magnitude relationship — "verification is far cheaper than generation" — still holds.
  • Cross-run comparison caveat. The 8B and 32B runs use different GPUs (RTX 4090 vs H100 NVL), so per-model absolute latencies are not directly comparable; what *is* comparable, and what this report emphasizes, is the worker/verifier *ratio* within each run.
  • A few individual cells are noisy (notably 32B 128/2048, see §4). Verifier times for small totals are dominated by fixed overhead and are more susceptible to jitter; treat single-cell anomalies with caution and rely on the overall trend.

6. Reproduction

Qwen3-8B (RTX 4090):

cd tools/vllm_worker_verify_pipeline
./benchmark_worker_verifier_latency.py \
  --model Qwen/Qwen3-8B \
  --dtype bfloat16 --trust-remote-code \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.95 \
  --input-lengths "128 512 1024 2048 4096 8192" \
  --output-lengths "1 16 64 256 1024 2048 4096 8192" \
  --top-k 20 --warmup 2 --repeats 5 \
  --gpu "4090" \
  --output-dir qwen3_8b

Qwen3-32B (H100 NVL):

cd tools/vllm_worker_verify_pipeline
./benchmark_worker_verifier_latency.py \
  --model Qwen/Qwen3-32B \
  --dtype bfloat16 --trust-remote-code \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.95 \
  --input-lengths "128 512 1024 2048 4096 8192" \
  --output-lengths "1 16 64 256 1024 2048 4096 8192" \
  --top-k 20 --warmup 2 --repeats 5 \
  --gpu "h100nvl" \
  --output-dir qwen3_32b

(These are the actual arguments that produced the committed data; the results are stored under experiments/worker-verifier-latency/data/qwen3_8b/ and experiments/worker-verifier-latency/data/qwen3_32b/. Note --max-model-len 32768 is required — the largest cells reach total = 16384 tokens, which an 8192 context cannot hold. The --gpu value is a free-form label recorded verbatim into metadata.json, not a detected device.)

Artifacts (per model dir): latency_summary.csv (aggregated metrics), latency_raw.jsonl (per-iteration raw timings), summary.md (Markdown table), metadata.json (args and environment).

Appendix A: Full Data Table — Qwen3-8B (RTX 4090)

inputoutputtotalworker med (s)verifier med (s)worker/verifier
12811290.02720.03320.82
128161440.28390.03408.36
128641921.10850.042226.27
1282563844.40610.062970.10
1281024115217.63040.1699103.78
1282048217635.39730.3117113.56
1284096422471.49020.846584.45
12881928320145.76691.487697.99
51215130.05490.08490.65
512165280.31370.08543.67
512645761.13870.086313.20
5122567684.44520.113039.35
5121024153617.71000.217381.51
5122048256035.55380.356199.84
5124096460871.81070.936176.71
51281928704146.30281.504697.24
1024110250.10160.15860.64
10241610400.36240.14672.47
10246410881.19050.16257.33
102425612804.50750.180225.02
10241024204817.83180.285562.45
10242048307235.78240.422484.70
10244096512072.23620.6905104.62
102481929216147.00831.590392.44
2048120490.20400.29100.70
20481620640.46680.29371.59
20486421121.30590.29734.39
204825623044.66110.319314.60
20481024307218.13710.423942.78
20482048409636.23360.564864.15
20484096614473.03830.819089.18
2048819210240148.44881.792282.83
4096140970.41810.53440.78
40961641120.68560.56931.20
40966441601.54160.81071.90
409625643524.98170.59828.33
40961024512018.76450.958519.58
40962048614437.20700.802346.38
40964096819274.60611.441351.76
4096819212288151.26202.422862.43
8192181930.88631.43330.62
81921682081.16551.44700.81
81926482562.04671.45721.40
819225684485.59121.44223.88
81921024921619.79631.624612.19
819220481024038.87591.837321.16
819240961228877.55422.115936.65
8192819216384156.84593.128750.13

Appendix B: Full Data Table — Qwen3-32B (H100 NVL)

inputoutputtotalworker med (s)verifier med (s)worker/verifier
12811290.03410.03800.90
128161440.36990.03839.67
128641921.43160.047630.06
1282563845.73710.075575.97
1281024115223.13200.2208104.79
1282048217646.32940.629673.59
1284096422493.09090.7953117.05
12881928320187.66461.923697.56
51215130.08690.09730.89
512165280.43690.10244.27
512645761.51960.109113.93
5122567685.86050.138542.31
5121024153623.21220.270985.69
5122048256046.55170.470798.90
5124096460893.12370.8756106.36
51281928704188.39371.960996.07
1024110250.15950.19620.81
10241610400.51150.18842.71
10246410881.60600.21387.51
102425612805.95310.242824.52
10241024204823.43370.375762.38
10242048307246.75940.567382.43
10244096512093.70200.976595.96
102481929216188.98992.089190.47
2048120490.33710.37720.89
20481620640.68220.38371.78
20486421121.76700.42734.14
204825623046.15260.426214.44
20481024307223.66890.572041.38
20482048409646.87430.973648.15
20484096614494.04701.405966.90
2048819210240189.61972.330081.38
4096140970.63760.95570.67
40961641120.98020.73941.33
40966441602.10580.79642.64
409625643526.54741.07986.06
40961024512024.22331.204920.10
40962048614447.90061.420033.73
40964096819295.57731.836152.05
4096819212288191.84522.797468.58
8192181931.42841.78340.80
81921682081.80251.85870.97
81926482562.94431.93471.52
819225684487.43791.92473.86
81921024921625.43692.141411.88
819220481024049.56432.344121.14
819240961228898.03492.818534.78
8192819216384195.83854.038348.49

Compare with the earlier Qwen2.5-7B verification-cost experiment

Back to papers and experiments →