Commit Graph
37 Commits
Author SHA1 Message Date
laoyao0822 a149289554 Ground CP shared KV collective choices in production-shaped evidence
Add a production-style CP shared KV collective benchmark and keep the page-aligned cache contract ledger current with the collective, unpack, multi-extend prefix, P2P, and CUDA IPC findings. The benchmark makes the final consumer layout explicit so dense all-reduce and owner-packed all-gather are compared after producing the same logical-dense result.\n\nConstraint: Prefixes may be assembled from multiple radix/cache extents, so single-run zigzag ordering is only a gated fast path.\nRejected: Treat rank-major all-gather output as the final product | consumers require logical-dense ordering.\nRejected: Switch index materialization based on noisy microbenchmarks | current evidence is not strong enough for production.\nConfidence: medium\nScope-risk: narrow\nDirective: Do not replace generic logical-dense materialization with zigzag ordered gather unless a run descriptor proves the prefix shape.\nTested: python -m py_compile benchmark/hicache/bench_cp_shared_kv_production_collective.py\nTested: Remote production-style benchmark logs under /mnt/beegfs/cjy/log/cp_shared_kv_collective_bench_*_20260531_*.log\nNot-tested: Production SGLang ETE with a CUDA IPC/P2P materialization path; this commit only adds benchmark/documentation surfaces.
2026-05-31 17:04:00 +08:00
laoyao0822 25f2147677 Reduce CP HiCache capacity synchronization to owner-lane logic
CP shared KV and HiCache now use owner-lane metadata as the
authoritative capacity view for host write admission and GPU load-back
planning. This removes the debug scalar capacity env and keeps CP load-back
from relying on a rank-wide scalar collective when per-owner availability is
already known. The load-back planner also accounts for evicting child leaves
that unlock ancestor device residency, which fixes small lane deficits despite
large aggregate evictable capacity.

The commit also adds gated CPU timing logs for CP shared-KV MLA/index
prefetch and a CUDA microbenchmark for comparing dense all-reduce with
owner-packed all-gather layouts. The timing logs are intentionally behind the
existing MLA prefetch log env and should not be enabled for throughput
measurements.

Constraint: CP shared KV owner lanes require target/draft capacity decisions to preserve page_owners rather than total-token scalars
Constraint: CUDA collective benchmarks must run on target GPU hosts, not locally
Rejected: Keep SGLANG_CP_HICACHE_CAPACITY_DEBUG observer env | owner-lane admission now replaces that scalar debug path
Rejected: Add a silent scalar-allreduce fallback | unexpected owner-lane mismatch should fail fast or log loudly
Confidence: medium
Scope-risk: moderate
Directive: Do not reintroduce CP capacity collectives on the scheduler hot path without proving the owner-lane metadata is insufficient
Directive: Disable SGLANG_CP_SHARED_KV_LOG_MLA_PREFETCH for end-to-end performance runs; it is diagnostic and high-volume
Tested: git diff --check
Tested: python -m py_compile on changed runtime/test/benchmark Python files
Tested: remote pytest -q test/registered/unit/mem_cache/test_cp_hicache_load_back_owner_lanes.py test/registered/unit/mem_cache/test_cp_hicache_metadata.py (81 passed, 5 warnings)
Not-tested: CUDA benchmark benchmark/hicache/bench_cp_shared_kv_prefetch_collective.py
Not-tested: full GLM5 E2E throughput after this commit
2026-05-28 08:31:49 +08:00
laoyao0822 2c94b8de23 Ground HiCache backup overlap policy in measured tails
The per-layer backup path did not explain end-to-end performance by inspection alone, so add a focused benchmark that compares all-layer tail backup against per-layer forward-overlap backup under the same page_first_direct layout. The benchmark reports total latency, over-forward-only latency, submit overhead, and winner so short-extend fallback decisions are based on measured cost rather than request-size intuition.

Constraint: CUDA benchmark execution is remote-only; this local commit only records the benchmark driver.

Rejected: Adding more online logs for this question | the user asked for benchmark evidence and logs would perturb scheduler behavior.

Confidence: high

Scope-risk: narrow

Directive: Do not infer production policy from per_extra alone; per-layer CPU submission can be hidden inside the forward timing interval, so total latency is the safer comparison metric.

Tested: Local py_compile benchmark/hicache/bench_cp_hicache_backup_overlap.py.

Tested: Remote benchmark logs generated under /mnt/beegfs/cjy/cp_hicache_backup_overlap_bench_20260527_*.log.

Not-tested: Full SGLang test suite; benchmark is standalone and CUDA execution was remote-only.
2026-05-28 03:43:05 +08:00
Kangyan-ZhouandClaude Opus 4.6 dc92f88a21 Enhance bench_multiturn.py with OpenAI API support and richer metrics (#19724)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:48:04 -08:00
a0a8f1473c [Benchmark] Fix generated_shared_prefix attribute naming and remove args dependency (#19363)
Co-authored-by: Alison Shao <alisonshao@Mac.attlocal.net>
Co-authored-by: sglang-bot <sglangbot@gmail.com>
2026-02-25 18:45:54 -08:00
Ratish PandLiangsheng Yin ae6f6e1495 [Refactor] Benchmark: Add typed DatasetArgs/Loader registry and CPU dataset unit tests (#19147)
Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
2026-02-24 12:22:01 -08:00
Liangsheng Yin 1f2da824dd [Benchmark] Remove re-exports from bench_serving.py (#19130) 2026-02-21 14:30:30 -08:00
Liangsheng Yin cd90346a2b Add cache hit rate UT (#18566) 2026-02-10 21:27:41 -08:00
JinYan SuandZhiqiang Xie 72e2f70ef7 feat(hicache): support numa detect to reduce long tail latency (#11028)
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
2026-01-15 14:11:49 -08:00
Frankandgemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> 9749d3e346 Update benchmarks to use HF token from environment. (#15421)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-18 13:47:27 -08:00
DarkSharpness ac5505b04c [Feature] HiCache JIT kernel (once again) (#13764) 2025-11-22 22:19:16 -08:00
Lianmin Zheng 7af9b88c6c Revert "[Feature] Introduce JIT Kernel in sglang (with hicache JIT kernel)" (#13644) 2025-11-20 02:11:12 -08:00
DarkSharpness b51f9bbee7 [Feature] Introduce JIT Kernel in sglang (with hicache JIT kernel) (#13453) 2025-11-20 00:03:32 -08:00
yinghui b88fab3111 fix: add seed bench_serving to cache key, remove redundant function definition. (#12680) 2025-11-04 23:39:11 -08:00
Lianmin Zheng ffc722a690 Revert "lang: support direct video inference" (#12038) 2025-10-23 19:21:31 -07:00
MickandLianmin Zheng 823b442945 lang: support direct video inference (#9936)
Co-authored-by: Lianmin Zheng <lianminzheng@gmail.com>
2025-10-23 18:12:39 -07:00
zhannngchen 7a68b4225a [improvement] add average input/output token length for hicache benchmark stats output (#10525) 2025-09-18 00:38:03 -07:00
zhannngchen 541551cefe [bugfix]hicache bench_long_context.py run failed (#10523) 2025-09-17 11:27:06 +08:00
ykwdandTeng Ma 4bb08f6e07 [Hicache] Evaluate Per-Round Metrics in Multiturn Bench (#10203)
Co-authored-by: Teng Ma <sima.mt@alibaba-inc.com>
2025-09-15 19:34:40 -07:00
Baizhou Zhang beac202bfd Add lora_path argument to bench_multiturn.py (#10092) 2025-09-05 19:20:42 -07:00
hzh0425andZhiqiang Xie 8c2ffaaf0f fix(hicahce-long-bench): adjust context workload generator to use full query set (#9847)
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
2025-08-31 14:51:18 -07:00
Pawel KowalskiandPawel Kowalski 20445327b2 fix inconsistent arguments for generated shared prefix bench (#9073)
Co-authored-by: Pawel Kowalski <pawel.kowalski@silo.ai>
2025-08-31 14:27:33 -07:00
pansicheng 09a1df2231 add bench_mix.py (#9788) 2025-08-28 23:44:26 -07:00
Zhiqiang Xieandgemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> 0eec4cb6cc HiCache, add bench long context plus minor fixs (#9086)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-11 16:54:52 -07:00
pansicheng e2fd2b9c7e Simple prefetch policy (#8692) 2025-08-08 02:09:28 -07:00
Zhiqiang Xie ce86e201df bug fix and tag (#8282) 2025-07-23 16:50:31 +08:00
ff45ab7a5f [Benchmark] add disable-auto-run param for hicache/bench_multiturn (#7822)
Co-authored-by: zhongwei.ren <zhongwei.ren@bytedance.com>
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
2025-07-22 14:02:40 -07:00
Chang SuandJin Pan 72676cd6c0 feat(oai refactor): Replace openai_api with entrypoints/openai (#7351)
Co-authored-by: Jin Pan <jpan236@wisc.edu>
2025-06-21 13:21:06 -07:00
Binyao Jiang b783c1cb82 Fix hicache benchmark script bug - some sampled input_request is [] (#7300) 2025-06-17 23:47:11 -07:00
Zhiqiang Xie e56685ac1b Upstreaming hicache bug fixes (#7267) 2025-06-17 17:44:57 -07:00
Lifu Huang 6e2da51561 Replace time.time() to time.perf_counter() for benchmarking. (#6178)
Signed-off-by: Lifu Huang <lifu.hlf@gmail.com>
2025-05-11 14:32:49 -07:00
applesaucethebunandBrayden Zhong 2ce8793519 Add typo checker in pre-commit (#6179)
Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
2025-05-11 12:55:00 +08:00
Brayden Zhong b149b39353 [CI] Remove unused imports with Ruff to pre-commit config, only to benchmarks/docs/examples folder (#3969) 2025-03-27 19:45:02 -07:00
Yueyang PanandZhiqiang Xie 25482edb5c Online serving benchmarks of real datasets for hierarchical KV caching (#3211)
Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu>
2025-03-05 16:16:43 -08:00
Lu Changqi e5760bc40a bench: add dataset param for bench_multiturn (#3990) 2025-03-05 01:21:37 -08:00
6c7a152c5a Hierarchical Caching for SGLang (#2693)
Co-authored-by: Wenxuan Tan <wenxuan.tan@wisc.edu>
Co-authored-by: Yineng Zhang <me@zhyncs.com>
2025-02-23 21:56:30 -08:00
Zhiqiang Xie 13387e6b7a Multi-turn benchmark for hierarchical caching (#2942) 2025-01-17 16:17:24 -08:00