# feat(bench): add SPEED-Bench dataset support to bench_serving#24149
Merged
Conversation
Add nvidia/SPEED-Bench (https://huggingface.co/datasets/nvidia/SPEED-Bench) as a new dataset option in bench_serving. Changes: - New SpeedBenchDataset plugin (python/sglang/benchmark/datasets/speed_bench.py) reading a pre-downloaded throughput_1k JSONL, optionally filtering by category (low_entropy / mixed / high_entropy) and fixing output length. - Register 'speed-bench' in DATASET_MAPPING. - Add --speed-bench-category and --speed-bench-output-len CLI args. Example usage: python -m sglang.bench_serving \ --dataset-name speed-bench \ --dataset-path /path/to/throughput_1k.jsonl \ --speed-bench-category mixed \ --speed-bench-output-len 512 \ --num-prompts 80
- Add 5 unit tests for SpeedBenchDataset in test_benchmark_datasets_api.py: test_speed_bench_sampler, test_speed_bench_category_filter, test_speed_bench_output_len_override, test_speed_bench_empty_category_raises, test_speed_bench_no_path_raises - Add speed-bench coverage to test_dataset_mapping_and_dispatch - Document speed-bench in docs_new/docs/developer_guide/bench_serving.mdx: dataset list entry, CLI flags section, and speculative decoding example
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for the SPEED-Bench dataset in the benchmark serving utility. The changes include documentation updates, new CLI arguments for category filtering and output length, the implementation of the SpeedBenchDataset class, and new unit tests. A review comment identifies opportunities to optimize the load method by tokenizing unique prompts before sampling, improving benchmark quality through shuffling during oversampling, and increasing robustness by specifying UTF-8 encoding when reading the dataset file.
- Tokenize unique prompts once before sampling to avoid redundant work - Shuffle oversampled rows for a realistic request distribution - Add encoding='utf-8' when opening the dataset file for robustness
5 tasks
Collaborator
|
/tag-and-rerun-ci |
zijiexia
approved these changes
May 20, 2026
Collaborator
|
/rerun-failed-ci |
zijiexia
enabled auto-merge (squash)
May 20, 2026 20:33
zijiexia
disabled auto-merge
May 25, 2026 20:48
Contributor
Author
|
/tag-and-rerun-ci extra |
1 similar comment
Contributor
Author
|
/tag-and-rerun-ci extra |
Contributor
Author
|
/tag-and-rerun-ci extra |
mqhc2020
pushed a commit
to mqhc2020/sglang
that referenced
this pull request
Jun 2, 2026
…project#24149) Co-authored-by: zijiexia <[email protected]> Co-authored-by: Khoa Pham <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add nvidia/SPEED-Bench as a new dataset option in
bench_serving.Motivation
SPEED-Bench (SPEculative Evaluation Dataset) is a unified benchmark specifically designed to evaluate Speculative Decoding (SD) algorithms across diverse semantic domains and realistic serving regimes (paper). It combines two purpose-built dataset splits:
low_entropy/mixed/high_entropy) to assess system-level throughput under high concurrency across the compute-bound → memory-bound transition that governs speculative decoding cost-benefit trade-offs.Adding it as a native dataset option enables reproducible, category-specific speculative decoding throughput benchmarking directly via
bench_serving, without requiring custom preprocessing scripts.Modifications
SpeedBenchDatasetplugin (python/sglang/benchmark/datasets/speed_bench.py) that reads a pre-downloadedthroughput_1kJSONL file, optionally filters by category (low_entropy/mixed/high_entropy), applies the model's chat template, and fixes the output length."speed-bench"inDATASET_MAPPING(python/sglang/benchmark/datasets/__init__.py).--speed-bench-categoryand--speed-bench-output-lenCLI args tobench_serving.py.Example usage:
Accuracy Tests
N/A — this PR only adds a dataset loader; it does not modify any model forward or kernel code.
Speed Tests and Profiling
N/A — this PR does not affect inference speed. The dataset plugin is used to drive existing
bench_servinginfrastructure.Checklist
test/registered/bench_fn/test_benchmark_datasets_api.py:test_speed_bench_sampler,test_speed_bench_category_filter,test_speed_bench_output_len_override,test_speed_bench_empty_category_raises,test_speed_bench_no_path_raises, and coverage intest_dataset_mapping_and_dispatch.docs_new/docs/developer_guide/bench_serving.mdx: addedspeed-benchto the dataset list with a description, added its CLI flags (--speed-bench-category,--speed-bench-output-len), and added a numbered example for speculative decoding throughput benchmarking.CI States
Latest PR Test (Base): ✅ Run #26535922407
Latest PR Test (Extra): ❌ Run #26535921652