[Refactor] Benchmark: Add typed DatasetArgs/Loader registry and CPU dataset unit tests (#19147)

Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
Ratish P
2026-02-24 12:22:01 -08:00
committed by GitHub
co-authored by Liangsheng Yin
parent 65de904130
commit ae6f6e1495
19 changed files with 807 additions and 160 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ from functools import wraps
import aiohttp
from sglang.bench_serving import RequestFuncOutput
from sglang.benchmark.datasets import sample_random_requests
from sglang.benchmark.datasets.random import sample_random_requests
from sglang.benchmark.utils import get_tokenizer, remove_prefix
# Set up logger
+1 -1
View File
@@ -11,7 +11,7 @@ import numpy as np
import requests
from tqdm.asyncio import tqdm
from sglang.benchmark.datasets import sample_random_requests
from sglang.benchmark.datasets.random import sample_random_requests
from sglang.benchmark.utils import get_tokenizer
from sglang.test.kits.cache_hit_kit import async_request_sglang_generate, gen_payload
+2 -2
View File
@@ -11,12 +11,12 @@ from nextqa import NExTQALoader
from tqdm.asyncio import tqdm
from transformers import PreTrainedTokenizerBase
from sglang.benchmark.datasets import (
from sglang.benchmark.datasets.common import (
SHAREGPT_FILENAME,
SHAREGPT_REPO_ID,
gen_prompt,
get_gen_prefix_cache_path,
)
from sglang.benchmark.datasets.generated_shared_prefix import get_gen_prefix_cache_path
from sglang.benchmark.utils import download_and_cache_hf_file
from sglang.lang.chat_template import get_chat_template, get_chat_template_by_model_path
from sglang.srt.entrypoints.openai.protocol import ChatCompletionMessageContentPart