Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
61a8218
refactor(connector): remove dead methods and aliases
GentleCold Jun 13, 2026
2dab0c2
refactor(transfer): remove dead code and unused parameter
GentleCold Jun 13, 2026
b20ea72
refactor(server): remove dead config fields and unused methods
GentleCold Jun 13, 2026
ff49b70
docs(daser): fix stale docstrings and metadata serialization
GentleCold Jun 13, 2026
2596253
fix(ops): unify rotary_dim boundary contract in rope_apply
GentleCold Jun 13, 2026
a3a2413
refactor(transfer): formalize capability surface on TransferLayer ABC
GentleCold Jun 13, 2026
748da50
refactor(connector): unify sync/async IPC client on shared base
GentleCold Jun 13, 2026
cbda164
refactor(daser): dedup rope kernels, metrics render, retrieval base
GentleCold Jun 13, 2026
197a4ef
refactor(server): dedup slot math, chunk-meta predicates, vllm client…
GentleCold Jun 13, 2026
8d4a977
refactor(connector): add SaveFuture type and dedup transfer init
GentleCold Jun 13, 2026
2bab394
refactor(transfer): extract stateless copy ops from iouring layer
GentleCold Jun 13, 2026
530a3e8
refactor(server): replace IPC dispatch if-ladder with handler table
GentleCold Jun 13, 2026
12142bc
refactor(server): extract ChunkLifecycle from ServerCore
GentleCold Jun 13, 2026
3b17a91
refactor(connector): collapse staging copy block-dim branches
GentleCold Jun 13, 2026
b219b78
refactor(transfer): extract L2IoEngine from iouring layer
GentleCold Jun 14, 2026
0cced39
refactor(transfer): extract L1Cache and collapse skip_l2 branches
GentleCold Jun 14, 2026
6174a1a
test(ops): make rope contract test runnable under CPU torch stub
GentleCold Jun 14, 2026
10d7077
docs(design): sync components doc with refactored structure
GentleCold Jun 14, 2026
0b76b27
refactor(bench): decouple datasets behind a registry
GentleCold Jun 14, 2026
ed459b7
refactor(bench): remove dead benchmark helpers and constants
GentleCold Jun 14, 2026
474004c
refactor(bench): extract vllm-bench load generator into its own module
GentleCold Jun 14, 2026
7962293
refactor(daser): remove write-only attributes and unused accessors
GentleCold Jun 14, 2026
0f0f787
refactor(bench): drop unused settle_seconds from daser drain path
GentleCold Jun 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,37 @@ interleaves samples by dataset, reducing queue-order bias. `--max-samples`
limits each selected JSONL file independently. LongBench is intended for
long-text performance validation rather than fast correctness smoke tests.

### Adding a dataset

Datasets live behind a registry in `utils/datasets.py`, so the runner and load
generator never branch on a dataset name. To add one, subclass
`BenchmarkDataset`, set `name`, implement `load()` (return `BenchmarkSample`
objects), declare your own CLI options in `add_cli_args`, build yourself in
`from_args`, and decorate the class with `@register_dataset`:

```python
@register_dataset
class MyDataset(BenchmarkDataset):
name = "mydata"

@classmethod
def add_cli_args(cls, parser):
parser.add_argument("--mydata-path")

@classmethod
def from_args(cls, args):
return cls(args.mydata_path, max_samples=args.max_samples)

def load(self):
return [BenchmarkSample(...), ...]
```

`--dataset mydata` then works in both `run_bench.py` and `bench_load.py` with no
edits to either: `add_dataset_cli_args` registers the options and
`build_dataset` dispatches by name. Prompt construction, sizing, load
generation, and metrics already consume only the normalized `BenchmarkSample`
shape.

## Prompt Construction

All service benchmarks use the same RAG chat prompt shape:
Expand Down
27 changes: 4 additions & 23 deletions benchmarks/bench_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
slot_size_for_block_tokens,
)
from benchmarks.utils.datasets import (
BenchmarkSample,
ImdbDataset,
LongBenchDataset,
add_dataset_cli_args,
build_dataset,
dedup_by_context,
interleave_samples,
)
Expand Down Expand Up @@ -65,10 +64,7 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
)
parser.add_argument("--manifest", default=None)
parser.add_argument("--prepared-config", default=None)
parser.add_argument("--dataset", choices=("imdb", "longbench"), required=True)
parser.add_argument("--imdb")
parser.add_argument("--longbench-dir")
parser.add_argument("--datasets", default=None)
add_dataset_cli_args(parser)
parser.add_argument("--max-samples", type=int, default=20)
parser.add_argument("--block-size", type=int, default=BLOCK_TOKENS)
parser.add_argument("--max-context-tokens", type=int, default=0)
Expand Down Expand Up @@ -104,7 +100,7 @@ async def main_async(args: argparse.Namespace) -> None:
raise ValueError("--model is required with --prepare-only")
if store_dir is None:
raise ValueError("--store-dir is required with --prepare-only")
samples = _load_samples(args)
samples = build_dataset(args).load()

from transformers import AutoConfig, AutoTokenizer

Expand Down Expand Up @@ -260,21 +256,6 @@ async def main_async(args: argparse.Namespace) -> None:
print(f"results={args.out}")


def _load_samples(args: argparse.Namespace) -> list[BenchmarkSample]:
if args.dataset == "imdb":
if not args.imdb:
raise ValueError("--imdb is required for --dataset imdb")
return ImdbDataset(args.imdb, max_samples=args.max_samples).load()
if not args.longbench_dir:
raise ValueError("--longbench-dir is required for --dataset longbench")
datasets = None
if args.datasets:
datasets = [item.strip() for item in args.datasets.split(",") if item.strip()]
return LongBenchDataset(
args.longbench_dir, datasets=datasets, max_samples=args.max_samples
).load()


def _should_dedup_context(args: argparse.Namespace) -> bool:
"""Return whether duplicate contexts should be removed from the workload.

Expand Down
Loading
Loading