vllm-request

vllm/vllm/v1/request.py · ef9339e · L165–186 · 固定 commit 上游

这是固定版本源码的只读摘录;可在线阅读,也可通过上游链接查看原文件。

165        # Tokens of output in flight when the request was preempted: delivered
166        # on return, but must not mutate the reset counters.
167        self.num_stale_output_tokens = 0
168        # Drop the stale output instead, for same-step preempt + resume
169        # (reset_prefix_cache).
170        self.drop_stale_output = False
171
172        # Tokens of steps whose output is not yet processed (async scheduling
173        # and PP run ahead of the GPU); `num_computed_tokens` counts them
174        # optimistically.
175        self.num_in_flight_tokens = 0
176
177        # V2+PP+async: Enforces `pp_size` cadence between same-request decode steps
178        # so the worker's broadcast slot ring stays consistent.
179        self.next_decode_eligible_step = 0
180
181        # Seq of the most recent step this request was scheduled in; fences
182        # deferred block freeing (see Scheduler._free_request_blocks).
183        self.last_sched_seq = 0
184
185        self.spec_token_ids: list[int] = []
186        self.num_computed_tokens = 0