Inspect · Task requirements
Requested file and log inspection, workspace inspection and source searches related to task requirements.
4 calls · #0001–#0004
cat <path>pwdrg --files -g <val> -g <path> -g <path> <path> <path> <path> <path>cat <val>GPT-6 Astra · RL
Qwen3-0.6B CodeOpt GRPO 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 agentGPT-6 Astra · 347 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 file and log inspection, workspace inspection and source searches related to task requirements.
4 calls · #0001–#0004
cat <path>pwdrg --files -g <val> -g <path> -g <path> <path> <path> <path> <path>cat <val>Requested workspace inspection and file and log inspection related to benchmark & validation setup.
1 call · #0005–#0005
ls -l -a <val>cat <path> <path> <path> <path> <path> <path> <path>Requested repository inspection related to source & workspace.
1 call · #0006–#0006
git status --shortRequested file and log inspection related to task requirements.
2 calls · #0007–#0008
cat <val>Requested repository inspection related to source & workspace.
3 calls · #0009–#0011
git status --shortRequested file and log inspection related to task requirements.
1 call · #0012–#0012
cat <val>Requested file and log inspection and source searches related to reward & policy updates.
1 call · #0013–#0013
cat <path> <path> <path> <path>rg -n <val> <path>Requested file and log inspection, source searches and script or workload execution related to source & workspace.
1 call · #0014–#0014
wc -l <path>rg -n <val> <path> <path>python - <script>Requested script or workload execution related to source & workspace.
1 call · #0015–#0015
bash <script>Requested file and log inspection related to source & workspace.
4 calls · #0016–#0019
sed -n <val> <path>Requested source searches related to checkpoints & weight state.
1 call · #0020–#0020
rg -n <val> <path> <path> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0021–#0021
tail -n <n> <path>Requested file and log inspection related to source & workspace.
2 calls · #0022–#0023
sed -n <val> <path>Requested file and log inspection and source searches related to optimizer & gradients.
1 call · #0024–#0024
sed -n <val> <path>rg -n <val> <path> <path> <path> <path> <path>Requested file and log inspection related to source & workspace.
2 calls · #0025–#0026
sed -n <val> <path>cat <path>Requested source searches and file and log inspection related to attention kernels.
2 calls · #0027–#0028
rg -n <val> <path> <path>rg --files <val>rg <val>sed -n <val> <path>tail -n <n> <path>cat <path>Requested workspace inspection, file and log inspection and runtime inspection related to device memory.
1 call · #0029–#0029
ls -l <val>cat <path>ps <flag> <args>head -n <n>npu-smi infoRequested file and log inspection related to benchmark & validation setup.
1 call · #0030–#0030
tail -n <n> <path>Requested file and log inspection related to device memory.
1 call · #0031–#0031
sed -n <val> <path>cat <path>Requested file and log inspection and source searches related to attention kernels.
3 calls · #0032–#0034
sed -n <val> <path>cat <path>rg -n <val> <path>Requested source searches and file and log inspection related to rollout generation.
1 call · #0035–#0035
rg -n <val> <path> <path>rg --files <val>rg <val>head -n <n>Requested file and log inspection related to attention kernels.
1 call · #0036–#0036
sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0037–#0037
tail -n <n> <path>Requested file and log inspection related to rollout generation.
1 call · #0038–#0038
sed -n <val> <path>Requested file and log inspection and source searches related to attention kernels.
1 call · #0039–#0039
sed -n <val> <path>rg -n <val> <path>tail -n <n>cat <val>head -n <n>Requested file and log inspection related to rollout generation.
1 call · #0040–#0040
sed -n <val> <path>Requested source searches, file and log inspection and script or workload execution related to attention kernels.
1 call · #0041–#0041
rg --files <val>rg <val>head -n <n>command -v <val>python -c <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0042–#0042
tail -n <n> <path>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0043–#0043
sed -n <val> <path>rg -n <val> <path>head -n <n>rg -n <val> <path> <path> <path>Requested file and log inspection and runtime inspection related to benchmark & validation setup.
1 call · #0044–#0044
tail -n <n> <path>ps <flag> <args>head -n <n>Requested file and log inspection and source searches related to source & workspace.
1 call · #0045–#0045
sed -n <val> <path>rg -n <val> <path> -g <path>Requested source searches and file and log inspection related to rollout generation.
2 calls · #0046–#0047
rg -n <val> <path> <path>rg --files <val>rg <val>sed -n <val> <path>tail -n <n> <path>Requested file and log inspection related to device memory.
1 call · #0048–#0048
sed -n <val> <path>cat <path>Requested source searches, file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0049–#0049
rg -n <val> <val> -g <path>head -n <n>ls <val>tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0050–#0050
sed -n <val> <path>cat <val>Requested code edits related to attention kernels.
1 call · #0051–#0051
Apply patch <patch>Requested file and log inspection and repository inspection related to benchmark & validation setup.
1 call · #0052–#0052
sed -n <val> <path>git diff --checktail -n <n> <path>Requested script or workload execution and repository inspection related to benchmark & validation setup.
1 call · #0053–#0053
python -m <module> --versioncommand -v <val>git diff --statRequested script or workload execution related to attention kernels.
1 call · #0054–#0054
python - <script>Requested file and log inspection and runtime inspection related to benchmark & validation setup.
1 call · #0055–#0055
tail -n <n> <path>ps <flag> <args>head -n <n>Requested source searches and file and log inspection related to rollout generation.
2 calls · #0056–#0057
rg --files <path> <path> <path> <path> <path> <n> > <path>rg <path>head -n <n>rg -n <val> <path>sed -n <val> <path>Requested repository inspection and script or workload execution related to attention kernels.
1 call · #0058–#0058
git diff --checkpython -m <module> -q <script> <script>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0059–#0059
cat > <path> <script>python -m <module> <script> -q -k <val> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0060–#0060
tail -n <n> <path>Requested source searches and file and log inspection related to optimizer & gradients.
1 call · #0061–#0061
rg -n <val> <path>head -n <n>rg -n <val> <path> -g <path>sed -n <val> <path>Requested script or workload execution related to batching & scheduling.
1 call · #0062–#0062
python -m <module> <script> <script> -q -k <val> > <path> <n> >& <path>Requested source searches and file and log inspection related to optimizer & gradients.
1 call · #0063–#0063
rg -n <val> <path>sed -n <val> <path>Requested script or workload execution related to attention kernels.
1 call · #0064–#0064
python -m <module> <script> -q -k <val> > <path> <n> >& <path>Requested source searches, file and log inspection and repository inspection related to attention kernels.
3 calls · #0065–#0067
rg -n <val> <val>rg -n <val> <path>sed -n <val> <path>rg -n <flag> <args>tail -n <n> <path>head -n <n> <path>git diff --numstatRequested script or workload execution related to benchmark & validation setup.
1 call · #0068–#0068
python -m <module> <script> -q -k <val> > <path> <n> >& <path>Requested code edits related to optimizer & gradients.
1 call · #0069–#0069
Apply patch <patch>Requested script or workload execution related to benchmark & validation setup.
1 call · #0070–#0070
bash <script> > <path> <n> >& <path>Requested file and log inspection related to optimizer & gradients.
1 call · #0071–#0071
tail -n <n> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0072–#0072
rg -n <val> <path> <path>head -n <n>sed -n <val> <path>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0073–#0073
cat > <path> <script>python -m <module> <script> -q > <path> <n> >& <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0074–#0074
python - <script>Requested source searches, workspace inspection and file and log inspection related to optimizer & gradients.
1 call · #0075–#0075
rg -n <flag> <args>ls <path>rg <val>tail -n <n> <path>Requested file and log inspection and script or workload execution related to checkpoints & weight state.
1 call · #0076–#0076
cat > <path> <script>python <script> > <path> <n> >& <path>Requested source searches, file and log inspection and workspace inspection related to dependencies & build setup.
1 call · #0077–#0077
rg -n <val> <path> <path> <val> <n> > <path>head -n <n>sed -n <val> <path>ls -l -a <path>Requested file and log inspection related to optimizer & gradients.
1 call · #0078–#0078
tail -n <n> <path>Requested source searches and script or workload execution related to dependencies & build setup.
1 call · #0079–#0079
rg -n <val> <path>python -m <module> <val> --no-deps <flag> <args>Requested source searches and file and log inspection related to attention kernels.
1 call · #0080–#0080
rg -n <val> <path> <path>head -n <n>tail -n <n> <path>Requested file and log inspection and source searches related to source & workspace.
1 call · #0081–#0081
sed -n <val> <path>rg -n <val> <path> <path> <path>head -n <n>Requested script or workload execution related to parallelism & communication.
1 call · #0082–#0082
python - <script>python <script> > <path> <n> >& <path>Requested script or workload execution related to batching & scheduling.
1 call · #0083–#0083
python - <script>Requested file and log inspection related to optimizer & gradients.
1 call · #0084–#0084
tail -n <n> <path>Requested script or workload execution related to dependencies & build setup.
1 call · #0085–#0085
python -m <module> <val> --no-deps <flag> <args>Requested file and log inspection related to rollout generation.
1 call · #0086–#0086
sed -n <val> <path>Requested script or workload execution related to source & workspace.
1 call · #0087–#0087
python - <script>Requested source searches and file and log inspection related to rollout generation.
1 call · #0088–#0088
rg -n <val> <path>head -n <n>sed -n <val> <path>rg -n <val> <path> -g <path>tail -n <n> <path>Requested file and log inspection, runtime inspection and repository inspection related to benchmark & validation setup.
1 call · #0089–#0089
tail -n <n> <path>ps <flag> <args>head -n <n>git status --shortRequested source searches and file and log inspection related to rollout generation.
1 call · #0090–#0090
rg -n <val> <path>tail -n <n>head -n <n>sed -n <val> <path>Requested script or workload execution related to attention kernels.
2 calls · #0091–#0092
python - <script><command> <args>Requested script or workload execution and file and log inspection related to kv-cache management.
1 call · #0093–#0093
python - <script>sed -n <val> <path>Requested file and log inspection and source searches related to rollout generation.
1 call · #0094–#0094
sed -n <val> <path>rg -n <val> <path>Requested file and log inspection and source searches related to device memory.
1 call · #0095–#0095
sed -n <val> <path>rg -n <val> <path>Requested source searches and file and log inspection related to rollout generation.
1 call · #0096–#0096
rg -n <val> <path>head -n <n>rg --files <val>rg <val>sed -n <val> <path>Requested script or workload execution, source searches and file and log inspection related to kv-cache management.
1 call · #0097–#0097
python - <script>rg -n <val> <path>head -n <n>Requested code edits related to kv-cache management.
1 call · #0098–#0098
Apply patch <patch>Requested file and log inspection related to kv-cache management.
1 call · #0099–#0099
<command> <args>sed -n <val> <path>Requested file and log inspection and source searches related to benchmark & validation setup.
1 call · #0100–#0100
sed -n <val> <path>rg -n <val> <path>head -n <n>tail -n <n> <path>Requested code edits related to rollout generation.
1 call · #0101–#0101
Apply patch <patch>Requested repository inspection related to rollout generation.
1 call · #0102–#0102
<command> <args>git diff --statRequested script or workload execution related to benchmark & validation setup.
1 call · #0103–#0103
python - <script>Requested script or workload execution related to kv-cache management.
1 call · #0104–#0104
python -m <module> <script> -q -k <val> > <path> <n> >& <path>Requested environment setup or inspection related to source & workspace.
1 call · #0105–#0105
env <vars> make <val> > <path> <n> >& <path>Requested file and log inspection and script or workload execution related to attention kernels.
1 call · #0106–#0106
cat > <path> <script>python -m <module> <script> -q > <path> <n> >& <path>Requested file and log inspection and repository inspection related to source & workspace.
1 call · #0107–#0107
tail -n <n> <path>git status --shortRequested script or workload execution and repository inspection related to optimizer & gradients.
1 call · #0108–#0108
python - <script>git diff --checkgit diff <flag> <args>Requested source searches, file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0109–#0109
rg -n <val> <path> <path> <path>sed -n <val> <path>python - <script>Requested script or workload execution and file and log inspection related to rollout generation.
1 call · #0110–#0110
python - <script>sed -n <val> <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0111–#0111
sed -n <val> <path>python - <script>Requested script or workload execution related to attention kernels.
1 call · #0112–#0112
python - <script>bash <script> > <path> <n> >& <path>Requested script or workload execution, runtime inspection and file and log inspection related to kv-cache management.
1 call · #0113–#0113
python - <script>ps <flag> <args>head -n <n>Requested script or workload execution related to dependencies & build setup.
1 call · #0114–#0114
python -m <module> <val> --no-deps <flag> <args>Requested source searches and file and log inspection related to rollout generation.
1 call · #0115–#0115
rg -n <flag> <args>sed -n <val> <path>rg -n <val> <path> <path>Requested file and log inspection and repository inspection related to benchmark & validation setup.
1 call · #0116–#0116
tail -n <n> <path>git status --shortgit diff --checkRequested file and log inspection, script or workload execution and environment setup or inspection related to kv-cache management.
1 call · #0117–#0117
cat <path>python - <script>env <vars> python -m <module> <script> -q -k <val> > <path> <n> <args>Requested file and log inspection and script or workload execution related to speculative decoding.
1 call · #0118–#0118
cat > <path> <script>python -m <module> <script> -q > <path> <n> >& <path>Requested code edits related to attention kernels.
1 call · #0119–#0119
Apply patch <patch>Requested script or workload execution related to source & workspace.
1 call · #0120–#0120
python - <script>Requested script or workload execution related to optimizer & gradients.
1 call · #0121–#0121
<command> <args>python -m <module> <script> -q > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0122–#0122
tail -n <n> <path>Requested file and log inspection related to optimizer & gradients.
1 call · #0123–#0123
tail -n <n> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0124–#0124
rg -n -A <n> -B <n> <val> <path>head -n <n>Requested file and log inspection related to benchmark & validation setup.
2 calls · #0125–#0126
tail -n <n> <path>Requested file and log inspection related to task requirements.
2 calls · #0127–#0128
cat <path>Requested repository inspection and source searches related to source & workspace.
4 calls · #0129–#0132
git diff --statrg -n -A <n> -B <n> <val> <path>Requested repository inspection related to attention kernels.
1 call · #0133–#0133
git diff <flag> <args>Requested repository inspection related to rollout generation.
1 call · #0134–#0134
git diff <flag> <args>Requested source searches related to kv-cache management.
1 call · #0135–#0135
rg -n <val> <path>Requested file and log inspection related to optimizer & gradients.
1 call · #0136–#0136
cat <path>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0137–#0137
rg -n <val> <path>tail -n <n>Requested file and log inspection related to source & workspace.
2 calls · #0138–#0139
sed -n <val> <path>tail -n <n> <path>Requested file and log inspection related to kv-cache management.
2 calls · #0140–#0141
sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0142–#0142
tail -n <n> <path>Requested file and log inspection related to attention kernels.
1 call · #0143–#0143
sed -n <val> <path>Requested file and log inspection related to source & workspace.
2 calls · #0144–#0145
tail -n <n> <path>sed -n <val> <path>Requested file and log inspection related to kv-cache management.
1 call · #0146–#0146
sed -n <val> <path>Requested runtime inspection and file and log inspection related to source & workspace.
2 calls · #0147–#0148
ps <flag> <args>head -n <n>tail -n <n> <path>Requested source searches related to benchmark & validation setup.
1 call · #0149–#0149
rg -n <val> <path> <path>Requested source searches related to source & workspace.
1 call · #0150–#0150
rg -n <val> <path> <path>Requested source searches related to rollout generation.
1 call · #0151–#0151
rg -n <val> <path> <path> <path>Requested source searches related to checkpoints & weight state.
1 call · #0152–#0152
rg -n <val> <path> <path> <path>Requested file and log inspection related to rollout generation.
1 call · #0153–#0153
sed -n <val> <path>Requested source searches related to device memory.
1 call · #0154–#0154
rg -n <val> <path> <path>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0155–#0156
sed -n <val> <path>rg -n <val> <path> <path> <path>Requested environment setup or inspection related to kv-cache management.
1 call · #0157–#0157
env <vars> python - <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0158–#0158
tail -n <n> <path>Requested file and log inspection related to device memory.
1 call · #0159–#0159
sed -n <val> <path>Requested file and log inspection related to rollout generation.
1 call · #0160–#0160
sed -n <val> <path>Requested source searches related to source & workspace.
1 call · #0161–#0161
rg -n <val> <path> <path> <path> <path>Requested file and log inspection related to rollout generation.
1 call · #0162–#0162
sed -n <val> <path>Requested file and log inspection related to source & workspace.
2 calls · #0163–#0164
tail -n <n> <path>Requested source searches and file and log inspection related to checkpoints & weight state.
1 call · #0165–#0165
rg -n -i <val> <path> <path>head -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0166–#0166
tail -n <n> <path>Requested source searches related to attention kernels.
1 call · #0167–#0167
rg --files <val>rg <val>Requested file and log inspection related to source & workspace.
1 call · #0168–#0168
sed -n <val> <val>Requested source searches related to dependencies & build setup.
1 call · #0169–#0169
rg -n <val> <path> <val> <val>Requested file and log inspection related to benchmark & validation setup.
1 call · #0170–#0170
tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0171–#0171
sed -n <val> <path>Requested source searches related to checkpoints & weight state.
1 call · #0172–#0172
rg -n <val> <path> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0173–#0173
tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0174–#0174
tail -n <n> <path>Requested file and log inspection related to device memory.
1 call · #0175–#0175
cat <path>Requested file and log inspection related to source & workspace.
1 call · #0176–#0176
sed -n <val> <path>Requested script or workload execution related to dependencies & build setup.
1 call · #0177–#0177
python -m <module> <val> --no-deps <flag> <args>Requested file and log inspection related to task requirements.
1 call · #0178–#0178
cat <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0179–#0179
tail -n <n> <path>Requested source searches and file and log inspection related to device memory.
1 call · #0180–#0180
rg -n <val> <path>tail -n <n>Requested file and log inspection related to source & workspace.
2 calls · #0181–#0182
tail -n <n> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0183–#0183
tail -n <n> <path>Requested file and log inspection related to source & workspace.
2 calls · #0184–#0185
sed -n <val> <path>tail -n <n> <path>Requested script or workload execution related to source & workspace.
1 call · #0186–#0186
python - <script>Requested source searches and file and log inspection related to benchmark & validation setup.
3 calls · #0187–#0189
rg -n <val> <path>tail -n <n>tail -n <n> <path>rg --files <val>rg <val>Requested file and log inspection related to source & workspace.
1 call · #0190–#0190
tail -n <n> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0191–#0191
python - <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0192–#0192
tail -n <n> <path>cut -c <val>Requested source searches related to batching & scheduling.
1 call · #0193–#0193
rg -n <val> <path> <path>Requested file and log inspection related to source & workspace.
1 call · #0194–#0194
sed -n <val> <path>Requested source searches related to optimizer & gradients.
1 call · #0195–#0195
rg -n <val> <path> <path>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0196–#0197
tail -n <n> <path>rg -n <val> <val>Requested file and log inspection related to rollout generation.
1 call · #0198–#0198
sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0199–#0199
sed -n <val> <path>Requested file and log inspection related to rollout generation.
2 calls · #0200–#0201
cat <path>sed -n <val> <path>Requested source searches related to runtime processes.
1 call · #0202–#0202
rg --files <val>rg <val>Requested file and log inspection and source searches related to rollout generation.
3 calls · #0203–#0205
sed -n <val> <path>rg -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0206–#0206
tail -n <n> <path>Requested file and log inspection related to runtime processes.
1 call · #0207–#0207
tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0208–#0208
sed -n <val> <path>cat <path>Requested script or workload execution related to source & workspace.
1 call · #0209–#0209
python -X <val> -c <script> > <path> <n> > <path>Requested script or workload execution related to rollout generation.
1 call · #0210–#0210
python -X <val> -c <script> > <path> <n> > <path>Requested environment setup or inspection related to source & workspace.
1 call · #0211–#0211
env <vars> make <val> > <path> <n> >& <path>Requested file and log inspection related to source & workspace.
2 calls · #0212–#0213
tail -n <n> <path>Requested file and log inspection related to runtime processes.
1 call · #0214–#0214
tail -n <n> <path>Requested repository inspection and source searches related to source & workspace.
2 calls · #0215–#0216
git status --shortrg -n <val> <path>Requested source searches related to rollout generation.
1 call · #0217–#0217
rg -n <val> <path> <path>Requested file and log inspection and runtime inspection related to source & workspace.
7 calls · #0218–#0224
tail -n <n> <path>cut -c <val>ps <flag> <args>head -n <n>sed -n <val> <path>ps -o <val> -p <val>Requested script or workload execution related to rollout generation.
1 call · #0225–#0225
python - <script>Requested environment setup or inspection and process termination related to source & workspace.
2 calls · #0226–#0227
env <vars> python <script> > <path> <n> >& <path>kill <flag> <args>Requested file and log inspection related to source & workspace.
2 calls · #0228–#0229
cat <path>tail -n <n> <path>cut -c <val>Requested script or workload execution related to source & workspace.
1 call · #0230–#0230
python - <script>Requested script or workload execution related to rollout generation.
2 calls · #0231–#0232
python - <script>Requested environment setup or inspection related to source & workspace.
1 call · #0233–#0233
env <vars> python <script> > <path> <n> >& <path>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0234–#0235
cat <path>rg -n <val> <path>tail -n <n>Requested source searches related to runtime processes.
1 call · #0236–#0236
rg -n <val> <path>Requested file and log inspection related to rollout generation.
1 call · #0237–#0237
sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0238–#0238
sed -n <val> <path>Requested source searches and file and log inspection related to runtime processes.
1 call · #0239–#0239
rg -n <val> <path>head -n <n>Requested source searches related to rollout generation.
1 call · #0240–#0240
rg -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
3 calls · #0241–#0243
rg -n <val> <path>head -n <n>tail -n <n> <path>cut -c <val>rg --files <path>rg <path>Requested file and log inspection related to rollout generation.
1 call · #0244–#0244
sed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
4 calls · #0245–#0248
rg -n <val> <path>head -n <n>sed -n <val> <path>rg -n <val> <path> <path>rg --files <path>rg <val>Requested file and log inspection related to rollout generation.
1 call · #0249–#0249
sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0250–#0250
tail -n <n> <path>cut -c <val>Requested file and log inspection and source searches related to rollout generation.
1 call · #0251–#0251
sed -n <val> <path>rg -n <val> <val> --glob <path>head -n <n>Requested code edits related to rollout generation.
1 call · #0252–#0252
Apply patch <patch>Requested script or workload execution related to checkpoints & weight state.
1 call · #0253–#0253
python - <script>bash <script> > <path> <n> >& <path>Requested tool activity related to rollout generation.
1 call · #0254–#0254
<command> <args>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0255–#0256
tail -n <n> <path>cut -c <val>rg --files <val>rg <val>head -n <n>Requested tool activity related to rollout generation.
1 call · #0257–#0257
<command> <args>Requested script or workload execution related to rollout generation.
1 call · #0258–#0258
python - <script>Requested file and log inspection related to runtime processes.
1 call · #0259–#0259
cat <path>Requested file and log inspection related to source & workspace.
1 call · #0260–#0260
tail -n <n> <path>Requested script or workload execution related to checkpoints & weight state.
1 call · #0261–#0261
python - <script>Requested script or workload execution related to rollout generation.
1 call · #0262–#0262
python - <script>Requested file and log inspection and script or workload execution related to attention kernels.
1 call · #0263–#0263
cat > <path> <script>python -m <module> <script> -q > <path> <n> >& <path>Requested file and log inspection related to runtime processes.
1 call · #0264–#0264
cat <path>tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0265–#0265
tail -n <n> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0266–#0266
python - <script>Requested file and log inspection related to source & workspace.
1 call · #0267–#0267
sed -n <val> <path>Requested script or workload execution related to rollout generation.
1 call · #0268–#0268
python - <script>Requested file and log inspection related to runtime processes.
1 call · #0269–#0269
tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0270–#0270
sed -n <val> <path>Requested script or workload execution and environment setup or inspection related to benchmark & validation setup.
1 call · #0271–#0271
python - <script>env <vars> python -m <module> <script> -q > <path> <n> >& <path>Requested file and log inspection and runtime inspection related to source & workspace.
3 calls · #0272–#0274
tail -n <n> <path>ps <flag> <args>head -n <n>cut -c <val>sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0275–#0275
tail -n <n> <path>cut -c <val>Requested repository inspection and file and log inspection related to source & workspace.
5 calls · #0276–#0280
git diff --checkgit status --shortsed -n <val> <path>Requested file and log inspection related to runtime processes.
1 call · #0281–#0281
sed -n <val> <path>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0282–#0282
rg -n <val> <path>head -n <n>Requested code edits related to source & workspace.
1 call · #0283–#0283
Apply patch <patch>Requested script or workload execution related to benchmark & validation setup.
1 call · #0284–#0284
python -m <module> <script> -q -k <val> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0285–#0285
tail -n <n> <path>cut -c <val>Requested file and log inspection related to runtime processes.
1 call · #0286–#0286
tail -n <n> <path>Requested repository inspection related to source & workspace.
1 call · #0287–#0287
git diff --numstatRequested file and log inspection related to benchmark & validation setup.
2 calls · #0288–#0289
tail -n <n> <path>cut -c <val>Requested runtime inspection and file and log inspection related to source & workspace.
1 call · #0290–#0290
ps <flag> <args>head -n <n>cut -c <val>Requested script or workload execution related to runtime processes.
1 call · #0291–#0291
python - <script>Requested tool activity related to kv-cache management.
1 call · #0292–#0292
<command> <args>Requested tool activity related to rollout generation.
1 call · #0293–#0293
<command> <args>Requested environment setup or inspection related to source & workspace.
1 call · #0294–#0294
env <vars> make <val> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0295–#0295
tail -n <n> <path>cut -c <val>Requested file and log inspection related to source & workspace.
1 call · #0296–#0296
tail -n <n> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0297–#0297
tail -n <n> <path>cut -c <val>Requested runtime inspection and file and log inspection related to source & workspace.
1 call · #0298–#0298
ps <flag> <args>head -n <n>cut -c <val>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0299–#0299
rg -n <val> <path>tail -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0300–#0300
rg --files <path>rg <val>tail -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0301–#0301
tail -n <n> <path>cut -c <val>Requested script or workload execution related to source & workspace.
1 call · #0302–#0302
python - <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0303–#0303
tail -n <n> <path>cut -c <val>Requested script or workload execution related to source & workspace.
1 call · #0304–#0304
python - <script>Requested process termination and script or workload execution related to benchmark & validation setup.
1 call · #0305–#0305
kill <flag> <args>bash <script> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0306–#0306
tail -n <n> <path>cut -c <val>Requested script or workload execution related to benchmark & validation setup.
1 call · #0307–#0307
python - <script>Requested file and log inspection related to source & workspace.
1 call · #0308–#0308
tail -n <n> <path>Requested file and log inspection related to benchmark & validation setup.
2 calls · #0309–#0310
tail -n <n> <path>cut -c <val>Requested file and log inspection and runtime inspection related to source & workspace.
2 calls · #0311–#0312
tail -n <n> <path>ps -o <val> -p <n> <flag> <args>Requested file and log inspection related to benchmark & validation setup.
1 call · #0313–#0313
tail -n <n> <path>cut -c <val>Requested environment setup or inspection related to source & workspace.
1 call · #0314–#0314
env <vars> python <script> <flag> <args>Requested file and log inspection related to benchmark & validation setup.
1 call · #0315–#0315
tail -n <n> <path>cut -c <val>Requested file and log inspection, source searches and repository inspection related to source & workspace.
2 calls · #0316–#0317
tail -n <n> <path>rg -n <val> <path>git diff --checkgit status --shortRequested file and log inspection related to benchmark & validation setup.
2 calls · #0318–#0319
tail -n <n> <path>cut -c <val>Requested script or workload execution related to checkpoints & weight state.
1 call · #0320–#0320
python - <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0321–#0321
tail -n <n> <path>cut -c <val>Requested script or workload execution related to checkpoints & weight state.
1 call · #0322–#0322
python - <script>Requested script or workload execution related to device memory.
1 call · #0323–#0323
python - <script>Requested file and log inspection related to source & workspace.
3 calls · #0324–#0326
tail -n <n> <path>cut -c <val>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0327–#0327
rg -n <val> <path>tail -n <n>Requested file and log inspection related to source & workspace.
3 calls · #0328–#0330
tail -n <n> <path>cut -c <val>Requested script or workload execution and process termination related to benchmark & validation setup.
1 call · #0331–#0331
python - <script>kill <flag> <args>bash <script> > <path> <n> >& <path>Requested file and log inspection related to source & workspace.
1 call · #0332–#0332
tail -n <n> <path>cut -c <val>Requested script or workload execution related to checkpoints & weight state.
1 call · #0333–#0333
python - <script>Requested file and log inspection related to benchmark & validation setup.
7 calls · #0334–#0340
tail -n <n> <path>cut -c <val>Requested script or workload execution related to benchmark & validation setup.
1 call · #0341–#0341
bash <script> > <path> <n> >& <path>Requested script or workload execution related to reward & policy updates.
1 call · #0342–#0342
python - <script>Requested script or workload execution related to source & workspace.
1 call · #0343–#0343
bash <script> > <path> <n> >& <path>Requested file and log inspection related to source & workspace.
1 call · #0344–#0344
cat <path>Requested script or workload execution related to reward & policy updates.
1 call · #0345–#0345
python - <script>Requested script or workload execution related to dependencies & build setup.
1 call · #0346–#0346
python - <script>Requested script or workload execution related to reward & policy updates.
1 call · #0347–#0347
python - <script>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 76b3bd40ca74d26f0c2bffaf42ed01f422fc70f6
@@ -96,11 +96,28 @@ def npu_flash_attn_varlen_func( causal=False, **kwargs, ):+ """Variable-length attention with tensor or host-side cumulative lengths.++ Host sequences let callers prepare the metadata once and reuse it across+ layers without a device-to-host synchronization for each attention call.+ """ keep_prob = 1.0 - dropout_p if softmax_scale is None: softmax_scale = 1.0 / math.sqrt(q.shape[-1]) + actual_seq_qlen = (+ tuple(cu_seqlens_q[1:].cpu().tolist()) if isinstance(cu_seqlens_q, torch.Tensor) else tuple(cu_seqlens_q[1:])+ )+ if cu_seqlens_k is cu_seqlens_q:+ actual_seq_kvlen = actual_seq_qlen+ else:+ actual_seq_kvlen = (+ tuple(cu_seqlens_k[1:].cpu().tolist())+ if isinstance(cu_seqlens_k, torch.Tensor)+ else tuple(cu_seqlens_k[1:])+ )+ if not causal: head_num = q.shape[1] output = npu_fusion_attention(@@ -113,8 +130,8 @@ def npu_flash_attn_varlen_func( scale=softmax_scale, keep_prob=keep_prob, input_layout="TND",- actual_seq_qlen=tuple(cu_seqlens_q[1:].cpu().numpy().tolist()),- actual_seq_kvlen=tuple(cu_seqlens_k[1:].cpu().numpy().tolist()),+ actual_seq_qlen=actual_seq_qlen,+ actual_seq_kvlen=actual_seq_kvlen, )[0] else: attn_mask_npu = get_attn_mask_npu(q.device)@@ -130,8 +147,8 @@ def npu_flash_attn_varlen_func( scale=softmax_scale, keep_prob=keep_prob, input_layout="TND",- actual_seq_qlen=tuple(cu_seqlens_q[1:].cpu().numpy().tolist()),- actual_seq_kvlen=tuple(cu_seqlens_k[1:].cpu().numpy().tolist()),+ actual_seq_qlen=actual_seq_qlen,+ actual_seq_kvlen=actual_seq_kvlen, sparse_mode=SPARSE_MODE, )[0] @@ -479,6 +479,9 @@ class FlashAttentionKwargs(TypedDict, total=False): """ Keyword arguments for Flash Attention with Compile. + On NPU, cumulative lengths may also be tuples of integers, allowing host+ metadata to be reused across layers without device-to-host transfers.+ Attributes: cu_seq_lens_q (`torch.LongTensor`, *optional*) Gets cumulative sequence length for query state.@@ -490,8 +493,8 @@ class FlashAttentionKwargs(TypedDict, total=False): Maximum sequence length for key state. """ - cu_seq_lens_q: torch.LongTensor | None- cu_seq_lens_k: torch.LongTensor | None+ cu_seq_lens_q: torch.LongTensor | tuple[int, ...] | None+ cu_seq_lens_k: torch.LongTensor | tuple[int, ...] | None max_length_q: int | None max_length_k: int | None @@ -585,8 +588,8 @@ def _flash_attention_forward( use_top_left_mask: bool = False, softcap: float | None = None, deterministic: bool | None = None,- cu_seq_lens_q: torch.LongTensor | None = None,- cu_seq_lens_k: torch.LongTensor | None = None,+ cu_seq_lens_q: torch.LongTensor | tuple[int, ...] | None = None,+ cu_seq_lens_k: torch.LongTensor | tuple[int, ...] | None = None, max_length_q: int | None = None, max_length_k: int | None = None, target_dtype: torch.dtype | None = None,@@ -642,10 +645,16 @@ def _flash_attention_forward( # # NOTE: it is user's responsibility to take care of flattening `position_ids` if that's needed by the model. # See #39121 for more information.- is_fa_with_position_ids = _is_packed_sequence(position_ids, batch_size=query_states.size(0)) is_fa_with_varlen_kwargs = all( kwarg is not None for kwarg in (cu_seq_lens_q, cu_seq_lens_k, max_length_q, max_length_k) )+ # Explicit lengths already describe the packing. Avoid inspecting device-side+ # position IDs again in every layer (and during checkpoint recomputation).+ is_fa_with_position_ids = (+ attention_mask is None+ and not is_fa_with_varlen_kwargs+ and _is_packed_sequence(position_ids, batch_size=query_states.size(0))+ ) # Contains at least one padding token in the sequence if attention_mask is not None:Base commit: 0b2151ec61de5d99e0811b01c09e43a99a23e69d
@@ -18,6 +18,32 @@ import torch.nn.functional as F from einops import rearrange, repeat +def prepare_npu_fa_kwargs(position_ids: torch.Tensor) -> dict:+ """Prepare packed attention lengths on the host before moving a batch to NPU.++ The NPU attention operator consumes host sequence lengths. Tuples also keep+ FSDP's input placement from moving this metadata to the device. Derive the+ boundaries from position IDs, rather than sample lengths, so a sample may+ itself contain multiple packed sequences.+ """+ if position_ids.device.type != "cpu" or position_ids.ndim != 2:+ return {}++ positions = position_ids.values() if position_ids.is_nested else position_ids.reshape(-1)+ starts = (positions == 0).nonzero().flatten()+ if starts.numel() <= 1:+ return {}++ cu_seqlens = (*starts.tolist(), positions.numel())+ max_length = max(end - start for start, end in zip(cu_seqlens[:-1], cu_seqlens[1:], strict=True))+ return {+ "cu_seq_lens_q": cu_seqlens,+ "cu_seq_lens_k": cu_seqlens,+ "max_length_q": max_length,+ "max_length_k": max_length,+ }++ # Copied from https://github.com/Dao-AILab/flash-attention/blob/main/flash_attn/bert_padding.py class IndexFirstAxis(torch.autograd.Function): @staticmethod@@ -0,0 +1,47 @@+# Copyright 2026 The verl team+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.++import torch+from torch.distributed.tensor import DTensor+++class LocalShardAdamW(torch.optim.AdamW):+ """Use native AdamW kernels for DTensors on a one-rank device mesh.++ On a one-rank mesh, the local tensor is the entire parameter. Passing its+ view to AdamW avoids distributed dispatch for every pointwise operation and+ lets PyTorch select foreach kernels on supported devices. Parameter groups+ and optimizer state still contain the original DTensors, preserving FSDP+ checkpoint save/load and the normal AdamW state dictionary.+ """++ def _init_group(self, group, *args, **kwargs):+ # Older PyTorch versions pass an additional amsgrad flag here. Forward+ # the original signature and only unwrap the temporary tensor lists.+ has_complex = super()._init_group(group, *args, **kwargs)+ tensor_lists = [value for value in (*args, *kwargs.values()) if isinstance(value, list)]+ if group["differentiable"] or any(+ isinstance(tensor, DTensor) and tensor.device_mesh.size() != 1+ for tensors in tensor_lists+ for tensor in tensors+ ):+ return has_complex++ # Only the temporary argument lists are changed. to_local() shares+ # storage, so native in-place updates also update the saved DTensors.+ for tensors in tensor_lists:+ for index, tensor in enumerate(tensors):+ if isinstance(tensor, DTensor):+ tensors[index] = tensor.to_local()+ return has_complex@@ -25,6 +25,77 @@ from typing import Any, Optional import ray +def create_lazy_actor(actor_cls: type) -> type:+ """Defer an actor's implementation imports until its constructor runs.++ Ray deserializes an actor's class even in processes that only receive its+ handle. A routing worker therefore needlessly imports an entire inference+ backend when handed a server handle. This proxy serializes only method+ signatures and an import path; the server process constructs the original+ implementation and runs all calls on that same instance.++ Supports importable classes with ordinary synchronous or asynchronous+ instance methods. Streaming methods must use the original actor class.+ """+ module_name, class_name = actor_cls.__module__, actor_cls.__qualname__+ if "<locals>" in class_name:+ raise ValueError("Lazy actors must be defined at module scope")++ # Local classes and functions are serialized by value. Handle holders can+ # reconstruct this proxy without importing Verl or the inference backend.+ class LazyActor:+ def __init__(self, *args, **kwargs):+ import importlib++ implementation = importlib.import_module(module_name)+ for name in class_name.split("."):+ implementation = getattr(implementation, name)+ self._implementation = implementation(*args, **kwargs)++ def __getattr__(self, name):+ return getattr(self._implementation, name)++ def forward_method(name, asynchronous):+ if asynchronous:++ async def method(self, *args, **kwargs):+ return await getattr(self._implementation, name)(*args, **kwargs)++ else:++ def method(self, *args, **kwargs):+ return getattr(self._implementation, name)(*args, **kwargs)++ return method++ for name, original in inspect.getmembers(actor_cls, inspect.isfunction):+ if name.startswith("__") and name != "__init__":+ continue+ if inspect.isgeneratorfunction(original) or inspect.isasyncgenfunction(original):+ raise ValueError(f"Lazy actors do not support streaming method {name}")+ method = (+ LazyActor.__init__ if name == "__init__" else forward_method(name, inspect.iscoroutinefunction(original))+ )+ method.__name__ = name+ method.__doc__ = original.__doc__+ # Ray needs argument binding, not type annotations. Backend types in+ # annotations would otherwise bring back the imports this proxy avoids.+ signature = inspect.signature(original)+ method.__signature__ = signature.replace(+ parameters=[+ parameter.replace(annotation=inspect.Parameter.empty) for parameter in signature.parameters.values()+ ],+ return_annotation=inspect.Signature.empty,+ )+ # Preserve Ray's per-method options, such as concurrency groups.+ method.__dict__.update({key: value for key, value in vars(original).items() if key.startswith("__ray_")})+ setattr(LazyActor, name, method)++ LazyActor.__name__ = actor_cls.__name__+ LazyActor.__doc__ = actor_cls.__doc__+ return LazyActor++ def ray_noset_visible_devices(env_vars=os.environ): # Refer to # https://github.com/ray-project/ray/blob/161849364a784442cc659fb9780f1a6adee85fce/python/ray/_private/accelerators/nvidia_gpu.py#L95-L96@@ -268,4 +268,12 @@ def build_optimizer(parameters, config: FSDPOptimizerConfig): f"Available optimizers: {dir(module)}" ) from e + if config.optimizer_impl == "torch.optim" and config.optimizer == "AdamW":+ from verl.utils.device import get_device_name++ if get_device_name() == "npu":+ from verl.utils.optimizers import LocalShardAdamW++ optimizer_cls = LocalShardAdamW+ return optimizer_cls(parameters, **optimizer_args)@@ -1260,9 +1260,21 @@ class FSDPEngineWithLMHead(FSDPEngine): def forward_step(self, micro_batch: TensorDict, loss_function, forward_only): device_name = get_device_name()+ attention_kwargs = {}+ if (+ device_name == "npu"+ and tu.get_non_tensor_data(micro_batch, "use_remove_padding", default=True)+ and not self.use_ulysses_sp+ and getattr(self.module.config, "_attn_implementation", None) == "flash_attention_2"+ ):+ from verl.utils.npu_flash_attn_utils import prepare_npu_fa_kwargs++ attention_kwargs = prepare_npu_fa_kwargs(micro_batch["position_ids"])+ # actually, we should avoid assigning like this... micro_batch = micro_batch.to(get_device_id()) model_inputs, output_args = self.prepare_model_inputs(micro_batch=micro_batch)+ model_inputs.update(attention_kwargs) # Honor mixed_precision.param_dtype resolved during FSDP setup. When dtype is fp32, # autocast is a no-op at best and a footgun at worst, so skip it entirely.@@ -38,6 +38,7 @@ from verl.utils.config import omega_conf_to_dataclass from verl.utils.device import get_resource_name, get_visible_devices_keyword, is_torch_npu_available from verl.utils.net_utils import get_free_port, is_valid_ipv6_address from verl.utils.profiler import DistProfiler, build_vllm_profiler_args+from verl.utils.ray_utils import create_lazy_actor from verl.utils.tokenizer import normalize_token_ids from verl.utils.vllm.vllm_fp8_utils import apply_vllm_fp8_patches from verl.workers.config import HFModelConfig, RolloutConfig@@ -237,7 +238,13 @@ class vLLMHttpServer: compilation_config = engine_kwargs.pop("compilation_config", None) or {} if isinstance(compilation_config, str): compilation_config = json.loads(compilation_config)- compilation_config.setdefault("cudagraph_mode", "FULL_AND_PIECEWISE")+ # Ascend falls back from FULL_AND_PIECEWISE to per-layer piecewise+ # graphs. A single-device colocated engine can use its full decode+ # graph support, avoiding Python dispatch between every decoder layer.+ default_graph_mode = "FULL_AND_PIECEWISE"+ if self._is_single_device_npu() and _VLLM_VERSION >= version.parse("0.18.0"):+ default_graph_mode = "FULL_DECODE_ONLY"+ compilation_config.setdefault("cudagraph_mode", default_graph_mode) # FULL cuda graph is not yet supported with DCP, downgrade to PIECEWISE dcp_size = engine_kwargs.get("decode_context_parallel_size", 1) or 1@@ -387,6 +394,7 @@ class vLLMHttpServer: usage_context = UsageContext.OPENAI_API_SERVER vllm_config = engine_args.create_engine_config(usage_context=usage_context) vllm_config.parallel_config.data_parallel_master_port = self._dp_master_port+ self._limit_colocated_kv_cache(vllm_config) fn_args = set(dict(inspect.signature(AsyncLLM.from_vllm_config).parameters).keys()) kwargs = {}@@ -430,6 +438,44 @@ class vLLMHttpServer: self.engine = engine_client self._server_port, self._server_task = await run_uvicorn(app, args, self._server_address) + def _is_single_device_npu(self) -> bool:+ return (+ self.rollout_mode == RolloutMode.HYBRID+ and self.nnodes == 1+ and len(self.workers) == 1+ and is_torch_npu_available(check_device=False)+ )++ def _limit_colocated_kv_cache(self, vllm_config):+ """Avoid repeatedly releasing an oversized cache between actor updates.++ For a uniform full-attention cache, one block per maximum-length+ request segment plus the allocator's null block is enough to run every+ scheduled request concurrently. The block limit still respects vLLM's+ profiled memory budget, and explicit cache sizing takes precedence.+ """+ if not self._is_single_device_npu() or not self.config.free_cache_engine:+ return+ model = vllm_config.model_config+ cache = vllm_config.cache_config+ if (+ not hasattr(cache, "max_num_gpu_blocks")+ or cache.max_num_gpu_blocks is not None+ or cache.num_gpu_blocks_override is not None+ or cache.kv_cache_memory_bytes is not None+ or model.is_hybrid+ or model.is_attention_free+ or model.is_encoder_decoder+ or model.is_multimodal_model+ or model.get_sliding_window() is not None+ or vllm_config.speculative_config is not None+ or vllm_config.kv_transfer_config is not None+ ):+ return+ blocks_per_request = (model.max_model_len + cache.block_size - 1) // cache.block_size+ cache.max_num_gpu_blocks = 1 + vllm_config.scheduler_config.max_num_seqs * blocks_per_request+ logger.info("Limiting colocated rollout KV cache to %d blocks", cache.max_num_gpu_blocks)+ async def run_headless(self, args: argparse.Namespace): """Run headless server in a separate thread.""" args.api_server_count = 0@@ -963,7 +1009,7 @@ class vLLMReplica(RolloutReplica): super().__init__( replica_rank, config, model_config, gpus_per_node, is_reward_model, is_teacher_model, name_suffix )- self.server_class = ray.remote(vLLMHttpServer)+ self.server_class = ray.remote(create_lazy_actor(vLLMHttpServer)) async def launch_servers(self): """Launch http server in each node."""Base commit: 5a0277de14789b245c781911b3119ed6af901b7b
@@ -60,6 +60,12 @@ class CacheConfig: num_gpu_blocks_override: int | None = None """Number of GPU blocks to use. This overrides the profiled `num_gpu_blocks` if specified. Does nothing if `None`. Used for testing preemption."""+ max_num_gpu_blocks: int | None = Field(default=None, gt=0)+ """Optional upper bound on the profiled number of GPU cache blocks.+ Unlike `num_gpu_blocks_override`, this never increases the allocation above+ the memory budget. Useful for engines that frequently release their cache+ and only need enough blocks for a bounded batch of requests. An explicit+ `num_gpu_blocks_override` takes precedence over this limit.""" sliding_window: int | None = None """Sliding window size for the KV cache. This is primarily set in `ModelConfig` and that value should be manually duplicated here."""@@ -166,6 +172,7 @@ class CacheConfig: "gpu_memory_utilization", "is_attention_free", "num_gpu_blocks_override",+ "max_num_gpu_blocks", "enable_prefix_caching", "prefix_caching_hash_algo", "cpu_kvcache_space_bytes",@@ -819,7 +819,7 @@ def get_max_concurrency_for_kv_cache_config( def may_override_num_blocks(vllm_config: VllmConfig, num_blocks: int) -> int: """- Override the number of kv cache blocks if `num_gpu_blocks_override` is set.+ Apply the cache allocation limit or an explicit block-count override. """ if vllm_config.cache_config.num_gpu_blocks_override is not None: num_gpu_blocks_override = vllm_config.cache_config.num_gpu_blocks_override@@ -829,6 +829,8 @@ def may_override_num_blocks(vllm_config: VllmConfig, num_blocks: int) -> int: num_gpu_blocks_override, ) num_blocks = num_gpu_blocks_override+ elif vllm_config.cache_config.max_num_gpu_blocks is not None:+ num_blocks = min(num_blocks, vllm_config.cache_config.max_num_gpu_blocks) return num_blocks