--- license: apache-2.0 pretty_name: Speculative decoding profiles configs: - config_name: runs data_files: runs/runs.parquet - config_name: steps data_files: steps/**/*.parquet - config_name: requests data_files: requests/**/*.parquet - config_name: tokens data_files: tokens/**/*.parquet - config_name: outputs data_files: outputs/**/*.parquet --- # Speculative decoding profiles Per-step timing and acceptance of speculative decoding in vLLM under load, recorded with sd-profiler. Each run's model, drafter checkpoint, GPU and software versions are in the `runs` table. ## How it was measured - **Engine:** vLLM, greedy (temperature 0), one GPU per run. - **Load:** [specdec_bench](https://github.com/NVIDIA/Model-Optimizer/tree/main/examples/specdec_bench) keeps C requests in flight on a SPEED-Bench split (first turns, up to 512 new tokens), with EAGLE-4's workload sizes: 22, 88, 128, 220, 440 and 880 prompts at C = 1, 8, 32, 64, 128 and 256, and four prompts per request in flight (at least 22) at other C. Each timed pass follows a matching warm pass on the same engine; only timed passes are here. - **Splits:** `qualitative` (880 prompts in 11 categories) and the throughput splits `throughput_1k` ... `throughput_32k` (1,536 prompts each, all of one length, counted with OpenAI's o200k tokenizer; three categories: low, mixed and high entropy). - **Accuracy runs:** one pass with the token log on (`prompts` in `runs` gives the count). Drafters keep their draft logits (vLLM's "probabilistic" drafting, which at temperature 0 still picks the top token). These runs are slower and are not meant for timing. - **Step log:** a vLLM plugin records CUDA events around every engine step. ## Tables Paths are `TABLE/GPU/TARGET/SPLIT/DRAFTER-kK/...`. Every file carries `gpu`, `target`, `split`, `drafter`, `k`, `c` and `start` (repeat number; 0 for accuracy runs), so files stack. **runs**: one row per run, `mode` = `load` or `accuracy`: throughput (`throughput_tps`, generated tokens ÷ elapsed workload time), output tokens, step counts, guessed and committed tokens, versions and model revisions. **steps**: one row per engine step of the timed pass. | Column | Meaning | |---|---| | `wall` | Unix time when the step entered the model runner | | `num_reqs`, `num_tokens` | Requests and tokens in the step | | `decode_reqs`, `spec_tokens` | Requests decoding, and guesses they carry | | `prefill_tokens` | Tokens of requests still in prefill | | `ctx_tokens` | Tokens already in the KV cache, summed over requests | | `full_graph`, `padded_tokens` | Whether the target ran as one CUDA graph; tokens after padding | | `hist` | Requests by tokens committed this step (index 0–16: accepted guesses plus one) | | `t_fwd`, `t_fwd_end` | GPU ms from the step's start to the target's forward start and end | | `t_lg0`, `t_lg1` | Same, for the target's LM head | | `t_samp`, `t_end` | Same, for the start of sampling/verification and the end of the step | | `t_d0`, `t_d1` | Same, for the drafter's propose call | | `since_prev_ms` | GPU ms from the previous step's start | **requests** (load runs): one row per request: `question_id`, `category`, `prompt_tokens`, streamed chunk sizes and times (`chunks`, `times`), and the generated token ids (`output_ids`). **tokens** (accuracy runs): one row per guessed token. | Column | Meaning | |---|---| | `step`, `wall` | Verification step counter and Unix time | | `req` | Request index within the run (matches `req` in `outputs`) | | `batch` | Requests in the step | | `draft_pos` | Position of the guess in its draft, 1..k | | `ctx`, `out_pos` | Tokens before the guess; its position in the output (0-based) | | `token`, `target_top` | The guess and the target's top token there | | `accepted` | Whether the guess was kept | | `t_prob`, `t_entropy`, `t_margin` | Target's probability of the guess, entropy (nats), top-1 minus top-2 probability | | `d_prob`, `d_entropy`, `d_margin` | Same for the drafter (NaN for n-gram, which has no probabilities) | **outputs** (accuracy runs): each answer's `output_ids`, with `req`, `question_id`, `category` and `prompt_tokens`, for comparing outputs against plain decoding. ## Code Recorded with sd-profiler: `scripts/run_load.py` (driver), `sd_profiler/` (the vLLM plugin with the step and token logs), `scripts/to_hf.py` (this layout).