Inspect · Source & workspace
Requested workspace inspection related to source & workspace.
1 call · #0075–#0075
echo <val>ls -l -a <val> <n> > <path>trueKimi K3 · Serving
vLLM Ascend Qwen3-8B CodeOpt saturation 1dev · Implementation Optimization
01 / PROCESS MAP
Compare agents on one time axis; overlapping spans line up vertically. Select an agent or bar to inspect its events.
Time starts at the first recorded activity. Select a bar or agent to open its events. Bars span the first and last recorded observation, including gaps; colored ticks mark tool calls. A hollow diamond marks a delegation whose child timing is unavailable.
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>. Each branch belongs to its named agent. Expand a delegation to inspect its child; branches can run concurrently. Call numbers preserve source order, not a serial schedule. Times are relative to the first recorded activity.
Requested workspace inspection related to source & workspace.
1 call · #0075–#0075
echo <val>ls -l -a <val> <n> > <path>trueRequested file and log inspection related to task requirements.
2 calls · #0076–#0077
Read <path>Requested workspace inspection related to source & workspace.
1 call · #0078–#0078
find <val> -type <val>sortRequested file and log inspection related to runtime processes.
1 call · #0079–#0079
Read <path>Requested file and log inspection related to source & workspace.
2 calls · #0080–#0081
Read <path>Requested file and log inspection related to benchmark & validation setup.
3 calls · #0082–#0084
Read <path>Requested file and log inspection related to source & workspace.
3 calls · #0085–#0087
Read <path>Requested file and log inspection related to task requirements.
2 calls · #0088–#0089
Read <path>Requested file and log inspection related to source & workspace.
1 call · #0090–#0090
Read <path>Requested file and log inspection related to task requirements.
1 call · #0091–#0091
Read <path>Requested file and log inspection, repository inspection and workspace inspection related to source & workspace.
3 calls · #0092–#0094
Read <path>cd <path>git log --oneline <flag> <args>catgit status <flag> <args>head -n <n>echo <flag>ls <path> <n> > <path>ls <path>Requested file and log inspection related to task requirements.
1 call · #0095–#0095
Read <path>Requested environment setup or inspection, source searches and file and log inspection related to source & workspace.
1 call · #0096–#0096
envgrep -E <val>sorthead -n <n>echo <flag>which <val> <val>python3 --versionRequested script or workload execution related to source & workspace.
2 calls · #0097–#0098
python3 -c <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0099–#0099
cd <val>bash <script> > <path> <n> >& <path>echo <val>Requested file and log inspection related to source & workspace.
1 call · #0100–#0100
cat <path>head -n <n>Requested environment setup or inspection, file and log inspection and script or workload execution related to benchmark & validation setup.
2 calls · #0101–#0102
cd <val>env <vars> bash <script> > <path> <n> >& <path>echo <val>head -c <n> <path>bash <script> > <path> <n> >& <path>Requested workspace inspection and source searches related to source & workspace.
2 calls · #0103–#0104
ls <path>echo <flag>ls <path> <n> > <path>Search <pattern> <path>Requested source searches related to batching & scheduling.
1 call · #0105–#0105
Search <pattern> <path>Requested file and log inspection related to source & workspace.
2 calls · #0106–#0107
Read <path>Requested file and log inspection related to source & workspace.
1 call · #0108–#0108
Read task output <task>Requested source searches related to source & workspace.
1 call · #0109–#0109
Search <pattern> <path>Requested source searches and file and log inspection related to batching & scheduling.
2 calls · #0110–#0111
Search <pattern> <path>Read <path>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0112–#0113
Search <pattern> <path>Read <path>Requested workspace inspection and file and log inspection related to benchmark & validation setup.
1 call · #0114–#0114
ls -l -a <path>tail -n <n> <path> <n> > <path>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0115–#0115
grep -E <val> <path>head -n <n>Requested source searches, file and log inspection and task coordination related to source & workspace.
7 calls · #0116–#0122
Search <pattern> <path>Read <path>Update task list <tasks>Requested execution waits, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0123–#0123
sleep <n>grep -E <val> <path>head -n <n>echo <val>tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0124–#0124
Read task output <task>Requested task coordination related to source & workspace.
1 call · #0125–#0125
Delegate <task>Delegated by Main agent at call #0125. Observed activity +09:55–+30:29.
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
ls <path>Requested file and log inspection related to source & workspace.
1 call · #0002–#0002
wc -l <path> <path> <path> <n> > <path>Requested file and log inspection related to task requirements.
1 call · #0003–#0003
Read <path>Requested file and log inspection and source searches related to source & workspace.
7 calls · #0004–#0010
Read <path>Search <pattern> <path>Requested source searches and workspace inspection related to attention kernels.
2 calls · #0011–#0012
Search <pattern> <path>ls <path> <path> <path> <path>Requested file and log inspection related to source & workspace.
2 calls · #0013–#0014
Read <path>Requested file and log inspection and source searches related to attention kernels.
3 calls · #0015–#0017
wc -l <path> <path>Search <pattern> <path>Read <path>Requested file and log inspection related to source & workspace.
1 call · #0018–#0018
Read <path>Requested file and log inspection and source searches related to attention kernels.
4 calls · #0019–#0022
Read <path>wc -l <path> <path> <path> <path>Search <pattern> <path>Requested file and log inspection related to source & workspace.
1 call · #0023–#0023
Read <path>Requested file and log inspection related to attention kernels.
1 call · #0024–#0024
Read <path>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
4 calls · #0025–#0028
Search <pattern> <path>Read <path>ls <path> <path>Requested source searches related to batching & scheduling.
1 call · #0029–#0029
Search <pattern> <path>Requested file and log inspection, source searches and workspace inspection related to source & workspace.
12 calls · #0030–#0041
Read <path>Search <pattern> <path>head -n <n> <path>echo <val>ls <path>Requested file and log inspection related to attention kernels.
1 call · #0042–#0042
Read <path>Requested source searches and file and log inspection related to source & workspace.
11 calls · #0043–#0053
Search <pattern> <path>Read <path>Requested source searches related to attention kernels.
2 calls · #0054–#0055
Search <pattern> <path>Requested workspace inspection related to source & workspace.
1 call · #0056–#0056
ls <path>Requested source searches related to attention kernels.
1 call · #0057–#0057
Search <pattern> <path>Requested file and log inspection and source searches related to source & workspace.
10 calls · #0058–#0067
Read <path>wc -l <path>Search <pattern> <path>Requested source searches related to attention kernels.
1 call · #0068–#0068
Search <pattern> <path>Requested file and log inspection and source searches related to source & workspace.
5 calls · #0069–#0073
Read <path>Search <pattern> <path>Requested source searches related to attention kernels.
1 call · #0074–#0074
Search <pattern> <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0126–#0126
cat <path>echopython3 -c <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0127–#0127
cd <val>bash <script> > <path> <n> >& <path>echo <val>Requested task coordination and file and log inspection related to source & workspace.
2 calls · #0128–#0129
Update task list <tasks>Read <path>Requested file and log inspection related to attention kernels.
1 call · #0130–#0130
Read <path>Requested script or workload execution related to source & workspace.
1 call · #0131–#0131
python3 -c <script> <n> > <path>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0132–#0133
Search <pattern> <path>Read <path>Requested script or workload execution related to attention kernels.
1 call · #0134–#0134
python3 <n> > <path> <script>Requested file and log inspection related to source & workspace.
3 calls · #0135–#0137
Read <path>Requested file and log inspection related to attention kernels.
1 call · #0138–#0138
Read <path>Requested source searches related to source & workspace.
1 call · #0139–#0139
Search <pattern> <path>Requested source searches related to attention kernels.
1 call · #0140–#0140
Search <pattern> <path>Requested file and log inspection related to source & workspace.
1 call · #0141–#0141
Read <path>Requested file and log inspection related to attention kernels.
1 call · #0142–#0142
Read <path>Requested source searches and file and log inspection related to source & workspace.
3 calls · #0143–#0145
Search <pattern> <path>Read <path>Requested file and log inspection related to attention kernels.
1 call · #0146–#0146
Read <path>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
3 calls · #0147–#0149
Search <pattern> <path>grep <flag> <args>head -n <n>ls <val>Requested script or workload execution related to batching & scheduling.
1 call · #0150–#0150
python3 -c <script>Requested file and log inspection, source searches and workspace inspection related to source & workspace.
7 calls · #0151–#0157
Read <path>Search <pattern> <path>ls <val>grep -E <val>tail -n <n> <path> <n> > <path>head -c <n>Requested source searches related to batching & scheduling.
1 call · #0158–#0158
Search <pattern> <path>Requested file and log inspection and source searches related to source & workspace.
4 calls · #0159–#0162
Read <path>Search <pattern> <path>Requested code edits related to source & workspace.
1 call · #0163–#0163
Edit <path>Requested source searches related to attention kernels.
2 calls · #0164–#0165
Search <pattern> <path>Requested task coordination related to source & workspace.
1 call · #0166–#0166
Update task list <tasks>Requested file and log inspection related to attention kernels.
1 call · #0167–#0167
Read <path>Requested code edits related to attention kernels.
1 call · #0168–#0168
Edit <path>Requested file and log inspection related to attention kernels.
1 call · #0169–#0169
Read <path>Requested code edits related to attention kernels.
2 calls · #0170–#0171
Edit <path>Requested file and log inspection related to attention kernels.
1 call · #0172–#0172
Read <path>Requested file and log inspection related to source & workspace.
1 call · #0173–#0173
Read <path>Requested file and log inspection related to attention kernels.
1 call · #0174–#0174
Read <path>Requested code edits related to attention kernels.
1 call · #0175–#0175
Edit <path>Requested code edits related to source & workspace.
1 call · #0176–#0176
Edit <path>Requested source searches related to attention kernels.
1 call · #0177–#0177
Search <pattern> <path>Requested code edits related to source & workspace.
1 call · #0178–#0178
Edit <path>Requested file and log inspection related to source & workspace.
1 call · #0179–#0179
Read <path>Requested code edits related to source & workspace.
2 calls · #0180–#0181
Edit <path>Requested script or workload execution related to attention kernels.
1 call · #0182–#0182
cd <path>python3 -c <script>Requested workspace inspection, source searches and script or workload execution related to latency & request handling.
1 call · #0183–#0183
ls <val>grep <val>python3 -c <script> <n> > <path>Requested script or workload execution related to source & workspace.
1 call · #0184–#0184
python3 <n> > <path> <script>Requested script or workload execution and workspace file updates related to benchmark & validation setup.
1 call · #0185–#0185
python3 -c <script>cp <path> <path>Requested file and log inspection related to source & workspace.
1 call · #0186–#0186
Read <path>Requested code edits related to source & workspace.
3 calls · #0187–#0189
Edit <path>Requested source searches related to source & workspace.
1 call · #0190–#0190
Search <pattern> <path>Requested script or workload execution related to source & workspace.
2 calls · #0191–#0192
cd <path>python3 -c <script>python3 <n> > <path> <script>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
6 calls · #0193–#0198
grep -r -n <val> <path> --include <path>headfind <path> -name <val> <n> > <path>xargs <val> <flag> <args>head -n <n>sed -n <val> <path>echo <val>grep -n <val> <path>cd <path>sed -n <val>Read <path>grep -E <val> <path>tail -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0199–#0199
cd <val>bash <script> > <path> <n> >& <path>echo <val>Requested task coordination related to source & workspace.
1 call · #0200–#0200
Update task list <tasks>Requested file and log inspection, script or workload execution and workspace file updates related to benchmark & validation setup.
3 calls · #0201–#0203
cat <path>python3 -c <script>cd <val>rm -f <val> <val> <val> <val> <val> <val>lsbash <script> > <path> <n> >& <path>echo <val>Requested repository inspection, file and log inspection and source searches related to source & workspace.
2 calls · #0204–#0205
cd <path>git diff --statgit diffhead -n <n>Search <pattern> <path>Requested source searches related to device memory.
1 call · #0206–#0206
Search <pattern> <path>Requested execution waits related to source & workspace.
1 call · #0207–#0207
Wait for <task>Requested script or workload execution related to batching & scheduling.
1 call · #0208–#0208
python3 -c <script>Requested workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0209–#0209
cd <val>rm -f <val> <val> <val> <val> <val> <val>bash <script> > <path> <n> >& <path>echo <val>Requested repository inspection, file and log inspection and source searches related to source & workspace.
2 calls · #0210–#0211
cd <path>git status <flag>headecho <flag>grep -v <val>head -n <n>Update task list <tasks>Requested source searches, file and log inspection and script or workload execution related to attention kernels.
1 call · #0212–#0212
cd <path>grep -r -n <val> <path> <path> <path> <n> > <path>headpython3 -c <script> <n> > <path>Requested execution waits, workspace inspection and source searches related to source & workspace.
1 call · #0213–#0213
sleep <n>ls <val>grep -E <val>python3 -c <script> <n> > <path>trueRequested execution waits, script or workload execution and file and log inspection related to benchmark & validation setup.
1 call · #0214–#0214
sleep <n>python3 -c <script> <n> > <path>truetail -n <n> <path> <n> > <path>head -c <n>Requested execution waits and script or workload execution related to source & workspace.
3 calls · #0215–#0217
sleep <n>python3 -c <script> <n> > <path>trueWait for <task>Requested script or workload execution related to batching & scheduling.
1 call · #0218–#0218
python3 -c <script>Requested script or workload execution, runtime inspection and source searches related to source & workspace.
1 call · #0219–#0219
bash <script>echo <val>ps <val>grep -E <val>grep -v <val>head -n <n>python3 -c <script>Requested workspace file updates, repository inspection and script or workload execution related to benchmark & validation setup.
1 call · #0220–#0220
cp <path> <path>cd <path>git diff --statpython3 -c <script>Requested task coordination related to source & workspace.
1 call · #0221–#0221
Update task list <tasks>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 7c254c14e2f2db1185d739075ee3cdc1da3cfde2
@@ -25,7 +25,16 @@ from vllm.model_executor.layers.rotary_embedding import MRotaryEmbedding from vllm.model_executor.layers.rotary_embedding.common import ApplyRotaryEmb from vllm.model_executor.layers.rotary_embedding.mrope import apply_interleaved_rope -from vllm_ascend.ops.rotary_embedding import AscendRotaryEmbedding, get_cos_and_sin_slice, update_cos_sin+from vllm_ascend.ops.rotary_embedding import (+ AscendRotaryEmbedding,+ get_cos_and_sin_slice,+ require_cos_sin_slice,+ update_cos_sin,+)++# The 310P rope path consumes `get_cos_and_sin_slice()`, so the per-step+# `update_cos_sin()` work must stay enabled on this platform.+require_cos_sin_slice() # Filled once per model forward in NPUModelRunner310._model_forward; read by every MRoPE layer. _mrope_cos_slice: torch.Tensor | None = None@@ -311,8 +311,10 @@ class AscendAttentionMetadataBuilder(AttentionMetadataBuilder[AscendMetadata]): # Get attn_mask from singleton AttentionMaskBuilder attn_mask = self.attn_mask_builder.get_attention_mask(common_attn_metadata.causal, self.model_config) - # TODO: Yet another unnecessary H2D while we already have a query_start_loc on device- query_start_loc = query_start_loc_cpu.pin_memory().to(self.device, non_blocking=True)+ # Reuse the query_start_loc tensor that the model runner already+ # uploaded to the device (identical content to query_start_loc_cpu),+ # instead of issuing a redundant H2D copy on every step.+ query_start_loc = common_attn_metadata.query_start_loc actual_seq_lengths_q = query_start_loc_cpu[1:].tolist() seq_lens_list = seq_lens.tolist()@@ -38,6 +38,31 @@ _STREAM_RESOURCE_GUIDANCE = ( "temporarily disabling graph mode to confirm the failure is capture-related." ) +# Ordering marker between FULL-graph replays and the graph-parameter update+# stream. Recording it on the main stream right before a replay enqueue marks+# a stream point that is reached only after all previously enqueued work+# (including the previous replay) has completed. The update stream waits on it+# device-side, which replaces a host-blocking `current_stream().synchronize()`+# that stalled the CPU on every decode step. `wait_event` snapshots the event+# state at call time, so re-recording it on the next step cannot disturb a+# wait that was already enqueued (the same re-record pattern the per-layer+# update ExternalEvents already rely on).+_replay_ordering_event: "torch.npu.Event | None" = None+++def record_replay_ordering_event() -> None:+ """Record the ordering marker on the current (main) stream."""+ global _replay_ordering_event+ if _replay_ordering_event is None:+ _replay_ordering_event = torch.npu.Event()+ _replay_ordering_event.record(torch.npu.current_stream())+++def wait_replay_ordering_event(update_stream: "torch.npu.Stream") -> None:+ """Make `update_stream` wait until the last recorded ordering marker."""+ if _replay_ordering_event is not None:+ update_stream.wait_event(_replay_ordering_event)+ def _is_stream_resource_capture_error(exc: RuntimeError) -> bool: message = str(exc)@@ -244,8 +269,12 @@ class ACLGraphWrapper: # In async scheduling or multi-threaded (MT) scenarios, it is possible that # the CPU's record event (from update_attn_params) for the iteration i completes # before the grph replay of iteration i-1.- # To ensure proper ordering, we must call synchronize here before replaying,- # so that update_attn_params only executes after the previous graph replay has fully completed.+ # To ensure proper ordering, the parameter update of iteration i must only+ # execute after the graph replay of iteration i-1 has fully completed.+ # Instead of stalling the host with a full stream synchronize, record an+ # ordering marker here (before this replay is enqueued); the update stream+ # waits on it device-side in update_full_graph_params, so the CPU can run+ # ahead while the device keeps the required update-after-replay order. # If we do not in main model and in full-graph mode when using merge-eagle-graph, # we do not need to synchronize. # When enable_enpu is on, model_runner orders update vs replay; skip here.@@ -253,7 +282,7 @@ class ACLGraphWrapper: is_draft_eagle = _EXTRA_CTX.is_draft_model and self.use_eagle need_sync = self.runtime_mode == CUDAGraphMode.FULL and not is_draft_eagle if not self.enable_enpu and need_sync:- torch.npu.current_stream().synchronize()+ record_replay_ordering_event() entry.aclgraph.replay() return entry.output @@ -278,6 +307,11 @@ def update_full_graph_params( draft_attn_metadatas=None, ): impl_cls = attn_backend.get_impl_cls()+ # Order the parameter update after the previously enqueued replay without+ # blocking the host. The marker is recorded on the main stream right+ # before the replay enqueue (see ACLGraphWrapper), so it only fires once+ # all prior work -- including the previous replay -- has completed.+ wait_replay_ordering_event(update_stream) impl_cls.update_graph_params( update_stream, forward_context,@@ -57,6 +57,19 @@ _cos: torch.Tensor = None _sin: torch.Tensor = None _cos_slice: torch.Tensor = None _sin_slice: torch.Tensor = None+# Whether any consumer of `get_cos_and_sin_slice()` is active in this process+# (currently only the MiniMax-M2 fused attention patch). When False,+# `update_cos_sin()` skips the per-step gather/repeat into `_cos`/`_sin`,+# which is pure dead work for models (e.g. Qwen3 dense) whose rope path reads+# `cos_sin_cache` directly. The 310P runner calls `update_cos_sin()` itself,+# so it is unaffected by this flag.+_cos_sin_slice_required: bool = False+++def require_cos_sin_slice() -> None:+ """Mark that the loaded model consumes `get_cos_and_sin_slice()`."""+ global _cos_sin_slice_required+ _cos_sin_slice_required = True def set_cos_and_sin(vllm_config, max_num_reqs, decode_token_per_req, dtype, device):@@ -132,6 +145,9 @@ def update_cos_sin(positions): global _cos_slice global _sin_slice + if not _cos_sin_slice_required:+ return+ if _cos_sin_cache is None or _cos is None or _sin is None: return @@ -126,7 +126,7 @@ from vllm_ascend.eplb.adaptor.vllm_adaptor import VllmEplbAdaptor from vllm_ascend.eplb.core.eplb_device_transfer_loader import D2DExpertWeightLoader from vllm_ascend.eplb.core.eplb_worker import EplbProcess from vllm_ascend.eplb.eplb_updator import EplbUpdator-from vllm_ascend.ops.rotary_embedding import set_cos_and_sin, update_cos_sin+from vllm_ascend.ops.rotary_embedding import require_cos_sin_slice, set_cos_and_sin, update_cos_sin from vllm_ascend.patch.worker.patch_draft_quarot import patch_load_weights from vllm_ascend.quantization.utils import enable_fa_quant from vllm_ascend.sample.sampler import AscendSampler@@ -498,6 +498,12 @@ class NPUModelRunner(GPUModelRunner): self.is_kv_consumer = vllm_config.kv_transfer_config.is_kv_consumer set_cos_and_sin(vllm_config, self.max_num_reqs, self.uniform_decode_query_len, self.dtype, self.device)+ if self.model_config.hf_config.model_type == "minimax_m2":+ # The MiniMax-M2 fused attention patch reads cos/sin through+ # `get_cos_and_sin_slice()`, so `update_cos_sin()` must keep+ # refreshing the slices every step. All other models read the+ # rope cache directly and skip that per-step work.+ require_cos_sin_slice() set_mc2_tokens_capacity(vllm_config, self.max_num_reqs, self.uniform_decode_query_len) set_mc2_mask(vllm_config, self.device) # Compute potential_max_tokens once here; it is reused by the skip-allreduce@@ -13,9 +13,17 @@ from vllm_ascend.ops.triton.triton_utils import get_vectorcore_num def copy_snapshot_to_gpu(buffer: CpuGpuBuffer) -> torch.Tensor:- """Copy a pinned snapshot of a CPU buffer to its GPU buffer."""- cpu_snapshot = buffer.cpu.clone().pin_memory()- return buffer.gpu.copy_(cpu_snapshot, non_blocking=True)+ """Copy the CPU snapshot of a buffer to its GPU buffer asynchronously.++ ``CpuGpuBuffer.cpu`` is already allocated in pinned memory, so this is a+ true async H2D copy. The caller must not rewrite the CPU buffer until the+ copy has completed; ``NPUModelRunner`` guarantees this via the+ ``prepare_inputs_event`` protocol (``synchronize_input_prep``) that wraps+ the whole input-preparation region, mirroring upstream vLLM. The previous+ ``clone().pin_memory()`` snapshot duplicated that protection with an extra+ pageable clone plus a fresh pinned allocation on every call.+ """+ return buffer.gpu.copy_(buffer.cpu, non_blocking=True) @triton.jit@@ -45,7 +45,7 @@ from vllm_ascend.ascend_forward_context import ( set_mc2_mask, set_mc2_tokens_capacity, )-from vllm_ascend.ops.rotary_embedding import set_cos_and_sin, update_cos_sin+from vllm_ascend.ops.rotary_embedding import require_cos_sin_slice, set_cos_and_sin, update_cos_sin from vllm_ascend.utils import set_weight_prefetch_method from vllm_ascend.worker.v2.aclgraph_utils import ModelAclGraphManager from vllm_ascend.worker.v2.attn_utils import build_attn_state@@ -125,6 +125,7 @@ class NPUModelRunner(GPUModelRunner): # TODO: remove set_cos_and_sin (together with update_cos_sin) when mla can properly handle cos/sin internally self.decode_query_len = self.num_speculative_steps + 1 set_cos_and_sin(vllm_config, self.max_num_reqs, self.decode_query_len, self.dtype, self.device)+ require_cos_sin_slice() set_mc2_tokens_capacity(vllm_config, self.max_num_reqs, self.decode_query_len) set_mc2_mask(vllm_config, self.device)