Inspect · Source & workspace
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>Claude Opus 5 · Serving
Offline throughput 1dev · Implementation Optimization
01 / PROCESS MAP
Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.
Main agentClaude Opus 5 · 167 visible calls
02 / EVENT SEQUENCE
Requests are grouped by agent, activity and topic. Delegations open into child branches. Summaries describe visible requests; tool errors and missing responses are flagged. A recorded response does not establish command success or a performance improvement.
Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>.
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>Requested file and log inspection and workspace inspection related to task requirements.
3 calls · #0002–#0004
Read <path>cd <path>ls -l -a <val> <val> <val> <path> <path> <val> <val>head -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0005–#0005
cd <path><command> <args>cat <val>Requested file and log inspection and source searches related to source & workspace.
3 calls · #0006–#0008
cd <path>wc -l <path>grep -n <val> <path>head -n <n>Read <path>Requested file and log inspection related to task requirements.
1 call · #0009–#0009
cd <path>cat <path>echo <val>Requested file and log inspection, environment setup or inspection and source searches related to source & workspace.
8 calls · #0010–#0017
Read <path>envgrep -i -E <val>sortecho <val>ls <path>git log --oneline <flag>git status <flag>headcat <path>echols <path> <n> > <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0018–#0018
date -uecho <flag>wc -l <path> <path> <path> <n> >& <path>tail -n <n>ls <path>head -n <n>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
3 calls · #0019–#0021
cat <path>echo <val>ls -R <path>head -n <n>wc -l <path>Read <path>Requested workspace inspection, file and log inspection and source searches related to attention kernels.
1 call · #0022–#0022
ls <path> <n> > <path>headecho <val>ls <path>grep -i -E <val>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0023–#0023
ls -a <path>echo <val>find <path> -iname <val> -o -iname <val>head -n <n>Requested workspace inspection and file and log inspection related to attention kernels.
2 calls · #0024–#0025
ls <path>echo <val>head -n <n>ls <path> <path> <path>wc -l <path> <path> <n> > <path>tail -n <n>Requested code edits related to source & workspace.
1 call · #0026–#0026
Write <path>Requested workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0027–#0027
chmod <val> <path>bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested file and log inspection related to source & workspace.
1 call · #0028–#0028
cat <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0029–#0029
tail -n <n> <path> <n> > <path>echo <val>wc -l <path>Requested execution waits and file and log inspection related to batching & scheduling.
1 call · #0030–#0030
sleep <n>tail -n <n> <path> <n> > <path>head -n <n>Requested file and log inspection related to source & workspace.
2 calls · #0031–#0032
cat <path> <n> > <path>head -n <n>tail -n <n> <path>Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0033–#0033
env <vars>grep -a -n -E <val> <val>tail -n <n>Requested execution waits, environment setup or inspection and source searches related to benchmark & validation setup.
1 call · #0034–#0034
sleep <n>env <vars>grep -a -o -E <val> <val>tail -n <n>echo <flag>tail -c <n> <val>Requested execution waits, environment setup or inspection and file and log inspection related to source & workspace.
1 call · #0035–#0035
sleep <n>env <vars>tail -c <n> <val>Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0036–#0036
env <vars>grep -a -o -E <val> <val>tail -n <n>echo <val>grep -a -o <val> <val>head -n <n>Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0037–#0037
env <vars>grep -a -o -E <val> <val>tail -n <n>Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0038–#0038
env <vars>grep -a -n -o -E <val> <val>sed -n <val>Requested file and log inspection and workspace file updates related to source & workspace.
1 call · #0039–#0039
cd <path>sed <path> <path> > <path>chmod <val> <path>tail -n <n> <path>Requested script or workload execution and execution waits related to source & workspace.
1 call · #0040–#0040
cd <path>nohup <val> <path> <val> <val> <flag> <args>echo <val>sleep <n>date -uRequested source searches and file and log inspection related to source & workspace.
5 calls · #0041–#0045
grep -r -n <val> <path> --include <path>grep -v <val>head -n <n>sed -n <val> <path>grep -n <val> <path>Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0046–#0046
env <vars>grep -a -o -E <path> <val>tail -n <n>echo <flag>tail -c <n> <val>Requested file and log inspection related to runtime processes.
1 call · #0047–#0047
sed -n <val> <path>echo <val>Requested execution waits, environment setup or inspection and source searches related to source & workspace.
1 call · #0048–#0048
sleep <n>env <vars>grep -a -o -E <path> <val>tail -n <n>echo <flag>tail -c <n> <val>Requested execution waits, environment setup or inspection and file and log inspection related to benchmark & validation setup.
1 call · #0049–#0049
sleep <n>env <vars>sed -n <path> <val>tr -d <val>echo <val>cat <path> <n> > <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0050–#0050
grep -r -n <val> <path> <path> <n> > <path>grep -v <val>head -n <n>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0051–#0051
sed -n <val> <path>echo <val>grep -n <val> <path>head -n <n>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0052–#0053
grep -r -n <val> <path>head -n <n>sed -n <val> <path>Requested source searches and file and log inspection related to batching & scheduling.
2 calls · #0054–#0055
grep -r -n <val> <path> <path> <path> <n> > <path>head -n <n>sed -n <val> <path>Requested workspace inspection, source searches and file and log inspection related to source & workspace.
1 call · #0056–#0056
ls <path>grep -r -n <val> <path>head -n <n>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0057–#0057
grep -r -n <val> <path>head -n <n>Requested file and log inspection, workspace inspection and source searches related to source & workspace.
5 calls · #0058–#0062
sed -n <val> <path>ls <path>cat <path> <n> > <path>head -n <n>grep -n <val> <path>echo <val>grep -i <val>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0063–#0063
sed -n <val> <path>echo <val>grep -n <val> <path>headRequested file and log inspection related to source & workspace.
1 call · #0064–#0064
sed -n <val> <path>Requested source searches, file and log inspection and workspace inspection related to batching & scheduling.
4 calls · #0065–#0068
grep -n <val> <path>head -n <n>sed -n <val> <path>ls <path> <n> > <path>ls <path>echo <flag>Requested file and log inspection and source searches related to source & workspace.
5 calls · #0069–#0073
sed -n <val> <path>echo <val>grep -n <val> <path>head -n <n>headgrep -r -n <val> <path>Requested script or workload execution related to task requirements.
1 call · #0074–#0074
cd <val> <n> > <path>cd <path>python3 -c <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0075–#0075
cd <path>head -n <n> <path>echo <val>Requested file and log inspection related to source & workspace.
1 call · #0076–#0076
cd <path>cat <path>Requested environment setup or inspection and source searches related to source & workspace.
1 call · #0077–#0077
envgrep -i <val>sortRequested repository inspection, workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0078–#0078
git status <flag>mkdir -p <path>bash <script> > <path> <n> > <path>echo <val>Requested code edits related to batching & scheduling.
1 call · #0079–#0079
Write <path>Requested environment setup or inspection, workspace inspection and file and log inspection related to benchmark & validation setup.
2 calls · #0080–#0081
env <vars>ls -l -a <val>echo <val>tail -c <n> <path> <n> > <path>date -uwc -c <path>tail -c <n> <path>ls <path> <n> > <path>headRequested file and log inspection and source searches related to batching & scheduling.
3 calls · #0082–#0084
sed -n <val> <path>echo <val>grep -n <val> <path>head -n <n>Requested environment setup or inspection and file and log inspection related to benchmark & validation setup.
1 call · #0085–#0085
date -uenv <vars>wc -c <path>tail -c <n> <path> <n> > <path>Requested file and log inspection related to source & workspace.
1 call · #0086–#0086
sed -n <val> <path>echo <val>echodate -uwc -c <path>Requested environment setup or inspection, file and log inspection and workspace inspection related to benchmark & validation setup.
2 calls · #0087–#0088
date -uenv <vars>wc -c <path>ls -l -a <val>tail -c <n> <path> <n> > <path>echo <val>cat <path> <n> > <path>head -n <n>tail -c <n> <path>Requested code edits related to source & workspace.
2 calls · #0089–#0090
Edit <path>Requested code edits related to batching & scheduling.
1 call · #0091–#0091
Edit <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0092–#0092
grep -n <val> <path>head -n <n>Requested code edits related to batching & scheduling.
2 calls · #0093–#0094
Edit <path>Requested code edits related to source & workspace.
1 call · #0095–#0095
Edit <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0096–#0096
grep -n <val> <path>head -n <n>Requested source searches, file and log inspection and script or workload execution related to batching & scheduling.
1 call · #0097–#0097
grep -n <val> <path>sed -n <val>echo <val>python3 -m <module> <script> <script> <script> <script> <script>Requested file and log inspection and source searches related to source & workspace.
4 calls · #0098–#0101
sed -n <val> <path>grep -n <val> <path>head -n <n>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0102–#0102
cd <path>bash <script> <n> <n> > <path> <n> >& <path>echo <val>Requested source searches and file and log inspection related to latency & request handling.
1 call · #0103–#0103
cd <path>grep -i -E <val> <path>tail -n <n>echo <val>grep -c <val> <path>grep <flag> <args>Requested file and log inspection related to source & workspace.
2 calls · #0104–#0105
date -ucd <path>wc -c <path>tail -c <n> <path>cat <path>Requested script or workload execution related to source & workspace.
1 call · #0106–#0106
cd <path>bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested execution waits, file and log inspection and source searches related to source & workspace.
2 calls · #0107–#0108
sleep <n>date -ucd <path>wc -c <path>grep <flag> <args>tail -c <n> <path>grep -c <val> <path>Requested script or workload execution related to source & workspace.
1 call · #0109–#0109
cd <path>bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested execution waits, source searches and file and log inspection related to source & workspace.
1 call · #0110–#0110
sleep <n>date -ucd <path>grep <flag> <args>head -c <n>echotail -c <n> <path>Requested repository inspection related to batching & scheduling.
1 call · #0111–#0111
git add <path> <path> <path> <path> <path>git status <flag>git commit -q -F <val> <script>git log --oneline <flag>Requested environment setup or inspection, workspace file updates and repository inspection related to source & workspace.
1 call · #0112–#0112
env <vars>rm -rf <path>mkdir -p <path>git <val> <val>tar -x -C <path>ls <path>sed <path> <path> > <path>grep -n <val> <path>git status <flag>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0113–#0113
cd <path>bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested execution waits and file and log inspection related to source & workspace.
1 call · #0114–#0114
sleep <n>date -ucd <path>tail -c <n> <path>Requested repository inspection, environment setup or inspection and script or workload execution related to benchmark & validation setup.
4 calls · #0115–#0118
git status <flag>env <vars>bash <script> > <path> <n> > <path>echo <val>sleep <n>date -uwc -c <path>cat <path> <n> > <path>echotail -c <n> <path>tail -c <n> <path> <n> > <path><command> <args>ls <path>Requested workspace inspection and script or workload execution related to source & workspace.
1 call · #0119–#0119
cd <path>ls -l -aecho <val>python3 -c <script>Requested script or workload execution, source searches and file and log inspection related to task requirements.
1 call · #0120–#0120
python3 -c <script>echo <val>grep -n <val> <path>headRequested file and log inspection related to benchmark & validation setup.
1 call · #0121–#0121
sed -n <val> <path>echo <val>Requested code edits related to source & workspace.
1 call · #0122–#0122
Write <path>Requested environment setup or inspection and file and log inspection related to task requirements.
1 call · #0123–#0123
env <vars>cat > <path> <script>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0124–#0124
cd <path>bash <script> <path> > <path> <n> >& <path>echo <val>Requested execution waits and file and log inspection related to source & workspace.
1 call · #0125–#0125
sleep <n>date -ucd <path>wc -l <path> <n> > <path>tail -c <n> <path>Requested code edits related to source & workspace.
1 call · #0126–#0126
Edit <path>Requested script or workload execution related to source & workspace.
1 call · #0127–#0127
cd <path>bash <script> <path> > <path> <n> >& <path>echo <val>Requested execution waits and file and log inspection related to source & workspace.
1 call · #0128–#0128
sleep <n>date -ucd <path>wc -l <path> <n> > <path>tail -c <n> <path>Requested source searches and file and log inspection related to batching & scheduling.
2 calls · #0129–#0130
cd <path>grep -n -E <val> <path>head -n <n>sed -n <val> <path>Requested code edits related to source & workspace.
1 call · #0131–#0131
Write <path>Requested script or workload execution related to source & workspace.
1 call · #0132–#0132
cd <path>bash <script> <path> > <path> <n> >& <path>echo <val>Requested execution waits and file and log inspection related to source & workspace.
1 call · #0133–#0133
sleep <n>date -ucd <path>wc -l <path> <n> > <path>tail -c <n> <path>Requested environment setup or inspection, file and log inspection and source searches related to runtime processes.
1 call · #0134–#0134
env <vars>sed <path> <path> > <path>grep -n <val> <path>cd <val>bash <script> <path> > <path> <n> >& <path>echo <val>Requested execution waits, file and log inspection and script or workload execution related to source & workspace.
2 calls · #0135–#0136
sleep <n>date -ucd <path>wc -l <path> <n> > <path>tail -c <n> <path><command> <args>diff <val> <val>head -n <n>python3 -c <script>Requested source searches, file and log inspection and workspace inspection related to task requirements.
1 call · #0137–#0137
grep -n <val> <path>head -n <n>ls <path>Requested repository inspection and environment setup or inspection related to task requirements.
1 call · #0138–#0138
git status <flag>env <vars>env <vars> bash <script> > <path> <n> > <path>echo <val>Requested execution waits, environment setup or inspection and file and log inspection related to benchmark & validation setup.
4 calls · #0139–#0142
sleep <n>date -uenv <vars>wc -c <path>ls <val>head -n <n>echo <val>grep -E <val> <path> <n> > <path>tail -n <n>python3 -m <module> <path>Requested script or workload execution related to source & workspace.
1 call · #0143–#0143
cd <path>bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested execution waits, source searches and file and log inspection related to benchmark & validation setup.
2 calls · #0144–#0145
sleep <n>date -ucd <path><command> <args>grep -E <val> <val> <n> > <path>tail -n <n>Requested script or workload execution, file and log inspection and environment setup or inspection related to source & workspace.
2 calls · #0146–#0147
bash <script> <n> >& <path>tail -n <n>echo <val>env <vars>rm -rf <path> <path> <path> <path> <path> <path> <path> <path> <path>ls <val>git status <flag>git log --oneline <flag>ls <flag> <args>echo <flag>ls <path> <n> > <path>head -n <n>du <flag> <args>grep -r -l -n <val> <path> <path> <n> > <path>Requested file and log inspection and source searches related to runtime processes.
1 call · #0148–#0148
head -n <n> <path>echo <val>grep -r -l -n <val> <path> <n> > <path>headRequested environment setup or inspection, file and log inspection and source searches related to benchmark & validation setup.
3 calls · #0149–#0151
env <vars> timeout <n> <path> -m <val> <path> -x -q <n> >& <path>tail -n <n>env <vars> timeout <n> <path> -m <val> <path> -x -q -p <val> <args>grep -v -E <val>sed -n <val>env <vars> timeout <n> <path> -m <val> <path> -q -p <val> <n> <args>grep -E <val>Requested source searches, environment setup or inspection and workspace file updates related to source & workspace.
1 call · #0152–#0152
grep -n <val> <path>echo <val>env <vars>rm -rf <path>mkdir -p <path>git <val> <val>tar -x -C <path>Requested environment setup or inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0153–#0153
env <vars>cd <path>env <vars> timeout <n> <path> -m <val> <path> -q -p <val> <n> <args>grep -v -E <val>grep -E <val>tail -n <n>Requested code edits related to source & workspace.
1 call · #0154–#0154
Write <path>Requested environment setup or inspection, source searches and file and log inspection related to source & workspace.
2 calls · #0155–#0156
env <vars>env <vars> timeout <n> <path> <path> <n> >& <path>grep -v -E <val>tail -n <n>grep -r -n <val> <path>grep -v <val>Requested file and log inspection related to batching & scheduling.
1 call · #0157–#0157
date -used -n <val> <path>echo <val>Requested environment setup or inspection, workspace file updates and workspace inspection related to runtime processes.
1 call · #0158–#0158
env <vars>rm -rf <path> <path> <path> <path> <path> <path>echo <val>ls <val>grep -v -E <val>git status <flag>git log --oneline <flag>git show --stat --oneline <val>tail -n <n>pgrep <flag> <args>grep -v <val>headRequested source searches and file and log inspection related to batching & scheduling.
1 call · #0159–#0159
cd <path>echo <val>grep -r -n <val> <path> --include <path>headgrep -r -n <val> -A <n> <path> --include <path>grep -E <val>head -n <n>Requested environment setup or inspection and source searches related to attention kernels.
1 call · #0160–#0160
env <vars> timeout <n> <path> -c <path> <n> >& <path>grep -v -E <val>Requested workspace inspection and repository inspection related to source & workspace.
1 call · #0161–#0161
date -uecho <val>ls <path>git status <flag>Requested environment setup or inspection, workspace file updates and file and log inspection related to batching & scheduling.
1 call · #0162–#0162
env <vars>mkdir -p <path>cat > <path> <script>echo <val>Requested environment setup or inspection related to source & workspace.
1 call · #0163–#0163
cd <path>env <vars> bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested execution waits, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0164–#0164
sleep <n>date -ucd <path>echo <path>grep -E <val> <path> <n> > <path>tail -n <n>Requested script or workload execution related to source & workspace.
1 call · #0165–#0165
cd <path>bash <script> <val> <val> > <path> <n> >& <path>echo <val>Requested execution waits, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0166–#0166
sleep <n>date -ucd <path>echo <path>grep -E <val> <path> <n> > <path>tail -n <n>Requested environment setup or inspection, workspace file updates and workspace inspection related to runtime processes.
1 call · #0167–#0167
env <vars>rm -rf <path> <path> <path>echo <val>ls <val>grep -v -E <val>git status <flag>git log --oneline <flag>pgrep <flag> <args>grep -v <val>head<command> <args>grep <n>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 340db9201005fc64635bb25db1d2538f955761c3
@@ -399,6 +399,11 @@ class Envs: SGLANG_CLIP_MAX_NEW_TOKENS_ESTIMATION = EnvInt(4096) SGLANG_MAX_NEW_TOKENS_LIMIT = EnvInt(None) + # Scheduler: keep the resident decode batch inside the captured decode-graph+ # ladder so decode stays replayable. Set to skip the cap and decode eagerly+ # above the largest captured batch size.+ SGLANG_DISABLE_DECODE_GRAPH_ADMISSION_CAP = EnvBool(False)+ # Scheduler: recv interval SGLANG_SCHEDULER_RECV_SKIPPER_WEIGHT_DEFAULT = EnvInt(1000) SGLANG_SCHEDULER_RECV_SKIPPER_WEIGHT_DECODE = EnvInt(1)@@ -200,6 +200,9 @@ from sglang.srt.managers.schedule_policy import ( from sglang.srt.managers.scheduler_components.batch_result_processor import ( SchedulerBatchResultProcessor, )+from sglang.srt.managers.scheduler_components.decode_graph_admission import (+ DecodeGraphAdmissionCap,+) from sglang.srt.managers.scheduler_components.dp_attn import SchedulerDPAttnAdapter from sglang.srt.managers.scheduler_components.flush_wrapper import SchedulerFlushWrapper from sglang.srt.managers.scheduler_components.idle_sleeper import (@@ -1036,6 +1039,10 @@ class Scheduler( self.max_running_requests // self.ps.pp_size, 1 ), )+ self.decode_graph_admission_cap = DecodeGraphAdmissionCap.from_worker(+ self.model_worker, max_running_requests=self.max_running_requests+ )+ self.decode_graph_admission_cap.log_once() self.tp_group = get_tp_group() self.tp_cpu_group = self.tp_group.cpu_group@@ -3060,7 +3067,10 @@ class Scheduler( return NextBatchPlan(batch_to_run=ret, running_batch=running_batch) def get_num_allocatable_reqs(self, running_bs):- res = get_parallel().pp_max_micro_batch_size - running_bs+ num_reqs_ceiling = self.decode_graph_admission_cap.apply(+ get_parallel().pp_max_micro_batch_size+ )+ res = num_reqs_ceiling - running_bs res = min(res, self.req_to_token_pool.available_size()) return res @@ -0,0 +1,72 @@+"""Admission ceiling that keeps the running decode batch graph-replayable."""++from __future__ import annotations++import logging+from typing import Optional++from sglang.srt.environ import envs++logger = logging.getLogger(__name__)+++class DecodeGraphAdmissionCap:+ """Bound the resident decode batch by the largest captured decode graph.++ Decode graphs are captured for a fixed ladder of batch sizes. A running+ batch above the top rung of that ladder cannot be replayed, so *every*+ decode step it takes falls back to eager execution. Where replay removes+ most of the per-step launch overhead, that per-step penalty outweighs the+ benefit of holding the extra requests resident: a batch that overshoots the+ ladder finishes its tokens slower in aggregate than a top-rung batch that+ leaves the remainder queued.++ So when the configured concurrency exceeds what was captured, this reports+ the ladder top as the admission ceiling instead. Queued requests are not+ dropped or reordered -- they are admitted by the normal scheduling path as+ resident ones retire.++ The cap is a no-op when there is no decode ladder to stay on (eager decode,+ graphs disabled) or when the configured concurrency already fits inside it.+ """++ def __init__(self, graph_max_bs: Optional[int], max_running_requests: int):+ self._graph_max_bs = graph_max_bs+ self._max_running_requests = max_running_requests++ @classmethod+ def from_worker(cls, tp_worker, max_running_requests: int):+ """Build from the worker that owns the captured decode graphs."""+ if envs.SGLANG_DISABLE_DECODE_GRAPH_ADMISSION_CAP.get():+ return cls(graph_max_bs=None, max_running_requests=max_running_requests)+ return cls(+ graph_max_bs=getattr(tp_worker, "decode_graph_max_bs", None),+ max_running_requests=max_running_requests,+ )++ @property+ def is_binding(self) -> bool:+ """Whether the cap actually lowers the configured concurrency."""+ return (+ self._graph_max_bs is not None+ and self._graph_max_bs > 0+ and self._max_running_requests > self._graph_max_bs+ )++ def apply(self, num_reqs_ceiling: int) -> int:+ """Return the admission ceiling to use in place of ``num_reqs_ceiling``."""+ if not self.is_binding:+ return num_reqs_ceiling+ return min(num_reqs_ceiling, self._graph_max_bs)++ def log_once(self):+ if self.is_binding:+ logger.info(+ "Capping the resident decode batch at %d request(s), the largest "+ "captured decode-graph batch size, so decode stays replayable "+ "(max_running_requests=%d). Set "+ "SGLANG_DISABLE_DECODE_GRAPH_ADMISSION_CAP=1 to keep the full "+ "concurrency and decode eagerly above the captured sizes.",+ self._graph_max_bs,+ self._max_running_requests,+ )@@ -1527,16 +1527,50 @@ class TokenizerManager(TokenizerControlMixin, TokenizerManagerScoreMixin): Current policy: - Respect explicit server flag `enable_tokenizer_batch_encode`. - Or, if no request has text or multimodal input (all use pre-tokenized input_ids or input_embeds), batch the requests without tokenization.+ - Or, if every request carries plain text that the batch path tokenizes+ identically to the per-request path (see `_batch_is_plain_text`), so a+ list-valued submission reaches the scheduler as one batch instead of+ trickling in while the remaining prompts are still being tokenized. - Batch tokenization does not support DP attention yet, and it will make everything goes to the first rank currently """- return batch_size > 0 and (- self.server_args.enable_tokenizer_batch_encode- or (- (not self.server_args.enable_dp_attention)- and (not self._batch_has_text(batch_size, requests))- )+ if batch_size <= 0:+ return False+ if self.server_args.enable_tokenizer_batch_encode:+ return True+ if self.server_args.enable_dp_attention:+ return False+ return (not self._batch_has_text(batch_size, requests)) or (+ self._batch_is_plain_text(batch_size, requests) ) + def _batch_is_plain_text(+ self, batch_size: int, obj: Union[GenerateReqInput, EmbeddingReqInput]+ ) -> bool:+ """Whether every request is plain text the batch path handles identically.++ The batch path runs the same `_validate_one_request` and+ `_create_tokenized_object` per request as the sequential path; the only+ difference is that the tokenizer sees the texts as one list. That+ equivalence holds only for inputs the batch path does not special-case:+ no multimodal data, no pre-tokenized `input_ids`, no `input_embeds`, and+ no cross-encoder pairs. It also requires the plain tokenizer, since the+ async dynamic batch tokenizer only serves single strings and the batch+ path would silently bypass it.+ """+ if self.tokenizer is None or self.async_dynamic_batch_tokenizer is not None:+ return False+ for i in range(batch_size):+ req = obj[i]+ if not isinstance(req.text, str) or not req.text:+ return False+ if req.input_ids is not None or req.input_embeds is not None:+ return False+ if req.contains_mm_input():+ return False+ if isinstance(req, EmbeddingReqInput) and req.is_cross_encoder_request:+ return False+ return True+ def _send_one_request( self, tokenized_obj: Union[TokenizedGenerateReqInput, TokenizedEmbeddingReqInput],@@ -87,6 +87,14 @@ class BaseTpWorker(ABC): # For a plain worker that's its own runner. return self.model_runner + @property+ def decode_graph_max_bs(self) -> Optional[int]:+ # Largest decode batch size this worker captured a graph for, or None+ # when decode is not graph-backed (eager runner, graphs disabled). The+ # scheduler uses it to keep the resident decode batch replayable.+ runner = getattr(self.model_runner, "decode_cuda_graph_runner", None)+ return getattr(runner, "max_bs", None)+ @property def sliding_window_size(self) -> Optional[int]: return self.model_runner.sliding_window_size