Profile with SPEED-Bench Dataset
Profile with SPEED-Bench Dataset
AIPerf supports benchmarking using SPEED-Bench (SPEculative Evaluation Dataset), a benchmark designed for evaluating speculative decoding across diverse semantic domains and input sequence lengths.
This guide covers profiling speculative-decoding-enabled inference servers using SPEED-Bench prompts and collecting server-side acceptance rate metrics per category.
Available Dataset Variants
Aggregate Datasets
These load all categories combined in a single dataset:
Per-Category Qualitative Datasets (80 prompts each)
For per-category acceptance rate measurement, each of the 11 qualitative domains is registered separately:
Per-Entropy-Tier Throughput Datasets (512 prompts each)
Each throughput ISL bucket is also available filtered by entropy tier:
Where {ISL} is one of: 1k, 2k, 8k, 16k, 32k.
Prepare the Dataset
NOTICE: This dataset is governed by the NVIDIA Evaluation Dataset License Agreement. For each dataset a user elects to use, the user is responsible for checking if the dataset license is fit for the intended purpose. The prepare data script below automatically fetches data from all the source datasets.
You should first download and prepare the dataset using the following one liner:
This will download all splits into the working directory as JSONL files. Other supported options of the prepare script:
--config: select which config to prepare, can be one of the splits in the dataset (e.g.,qualitative,throughput_2k) orallto prepare all of the configs.--output_dir: select different output directory to download the dataset to.
Start a Server with Speculative Decoding
Launch an inference server with speculative decoding enabled. For example, with vLLM:
Verify the server is ready:
Server Metrics Endpoint
AIPerf auto-discovers the Prometheus endpoint at {url}/metrics. If your server uses a different path, pass it explicitly with --server-metrics:
Recommended Defaults
Non-Reasoning Models
For standard (non-reasoning) models, use temperature=0 and a 4K output length cap:
Do not set ignore_eos — let the model stop naturally at its end-of-sequence token.
Reasoning Models
For reasoning models (e.g., DeepSeek-R1, QwQ), follow the model card’s recommended settings for temperature, top_p, and output length. Reasoning models typically require higher output limits and specific sampling parameters.
Per-Category Acceptance Rate Benchmarking
To measure acceptance rates per category (matching the SPEED-Bench paper methodology), run each category separately. Each run collects speculative decoding metrics from the server’s Prometheus endpoint.
Single Category
All 11 Categories with Matrix Report
Loop through all categories, then assemble results into a per-category matrix:
This produces a CSV (speed_bench_report.csv) and console table:
The report script computes acceptance length from vLLM counter metrics (accepted_tokens / num_drafts + 1) and also supports SGLang’s direct spec_accept_length gauge.
Additional report metrics:
Literature Acceptance-Length Datasets (GSM8K, MT-Bench, MATH-500, HumanEval, MBPP)
The speculative-decoding literature overwhelmingly reports acceptance length against five standard benchmarks. AIPerf registers each as a public dataset that is auto-downloaded from HuggingFace at runtime, so there is no prepare-data step: just select one with --public-dataset and run the same aiperf speed-bench-report workflow shown above.
Prompts are emitted verbatim (the raw question/problem/prompt field); the served model’s chat template wraps them at request time via --endpoint-type chat. HumanEval and MBPP are text-completion tasks in the spec-decode literature, so chat-wrapping them keeps the matrix uniform but shifts their acceptance length somewhat from the papers’ headline numbers. Acceptance length is correctness-agnostic, so use greedy decoding (--extra-inputs temperature:0) to match the headline numbers reported in the literature. Note that --osl does not apply to public datasets, so cap generation with --extra-inputs max_tokens:N instead. spec_al_mtbench is multi-turn: AIPerf dispatches both turns per session and feeds the live assistant reply back as conversation history between them - size it with --num-conversations rather than --request-count (see below).
Run All Five with a Matrix Report
Size each run to the full dataset — without an explicit count AIPerf defaults to 10 requests. Single-turn datasets use
--request-count; the multi-turnspec_al_mtbenchuses--num-conversations 80(one run per conversation), since--request-countrecycles its 80 sessions to reach the count. Cap generation with--extra-inputs max_tokens:N(--oslis ignored for public datasets), and keep these runs in their own artifacts directory sospeed-bench-reportdoes not average them into an unrelatedspeed_bench_*matrix.
The report recognizes these runs the same way it recognizes the speed_bench_* runs, producing one matrix column per dataset:
The accept_rate and throughput metrics work identically (aiperf speed-bench-report ./artifacts/ --metric accept_rate).
Profile with Aggregate Qualitative Split
To run all 880 prompts in a single benchmark (without per-category breakdown):
Profile with Throughput Splits
The throughput splits benchmark end-to-end performance at fixed input sequence lengths:
Replace speed_bench_throughput_1k with any throughput variant (_2k, _8k, _16k, _32k) to test at different input lengths.
Per-Entropy-Tier Throughput
To isolate entropy effects on acceptance rate at a given ISL:
Disable Server Metrics
Server metrics collection is enabled by default. To disable it: