@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 97ca4c3b60
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 10, 16:30 UTC

[Chore] Remove more V0 dead code from `sequence.py` (#31783)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>

Cyrus Leung committed Jan 6, 2026 at 18:25 UTC 97ca4c3b60fee59850f5a0d83fc8d899ae4dd0e6
2 files changed +1 -36
vllm/outputs.py
+1 -2
@@ -13,7 +13,6 @@ from vllm.logger import init_logger
13 from vllm.logprobs import PromptLogprobs, SampleLogprobs
14 from vllm.lora.request import LoRARequest
15 from vllm.multimodal.inputs import MultiModalPlaceholderDict
16 -from vllm.sequence import RequestMetrics
16 from vllm.v1.metrics.stats import RequestStateStats
17
18 logger = init_logger(__name__)
@@ -113,7 +112,7 @@ class RequestOutput:
112 prompt_logprobs: PromptLogprobs | None,
113 outputs: list[CompletionOutput],
114 finished: bool,
116 - metrics: RequestMetrics | RequestStateStats | None = None,
115 + metrics: RequestStateStats | None = None,
116 lora_request: LoRARequest | None = None,
117 encoder_prompt: str | None = None,
118 encoder_prompt_token_ids: list[int] | None = None,
vllm/sequence.py
-34
@@ -12,40 +12,6 @@ if TYPE_CHECKING:
12 else:
13 KVConnectorOutput = Any
14
15 -VLLM_TOKEN_ID_ARRAY_TYPE = "l"
16 -
17 -VLLM_INVALID_TOKEN_ID = -1
18 -
19 -
20 -@dataclass
21 -class RequestMetrics:
22 - """Metrics associated with a request.
23 -
24 - Attributes:
25 - arrival_time: The time when the request arrived.
26 - first_scheduled_time: The time when the request was first scheduled.
27 - first_token_time: The time when the first token was generated.
28 - time_in_queue: The time the request spent in the queue.
29 - finished_time: The time when the request was finished.
30 - scheduler_time: The time spent in the scheduler when this request was
31 - being considered by the scheduler.
32 - model_forward_time: The time spent in the model forward pass when this
33 - request was in the batch.
34 - model_execute_time: The time spent in the model execute function. This
35 - will include model forward, block/sync across
36 - workers, cpu-gpu sync time and sampling time.
37 - """
38 -
39 - arrival_time: float
40 - last_token_time: float
41 - first_scheduled_time: float | None
42 - first_token_time: float | None
43 - time_in_queue: float | None
44 - finished_time: float | None = None
45 - scheduler_time: float | None = None
46 - model_forward_time: float | None = None
47 - model_execute_time: float | None = None
48 -
15
16 # cannot use msgspec.Struct here because Dynamo does not support it
17 @dataclass