@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 2e54db4d2b
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 14, 05:30 UTC

[Core] Remove unused `prev_sampled_token_ids_invalid_indices` input batch field (#26514)

Signed-off-by: Nick Hill <nhill@redhat.com>

Nick Hill committed Oct 9, 2025 at 13:22 UTC 2e54db4d2b468f1dd1580238b74d80da0695995f
2 files changed -4
vllm/v1/worker/gpu_input_batch.py
-1
@@ -251,7 +251,6 @@ class InputBatch:
251
252 # Cached reference to the GPU tensor of previously sampled tokens
253 self.prev_sampled_token_ids: Optional[torch.Tensor] = None
254 - self.prev_sampled_token_ids_invalid_indices: Optional[set[int]] = None
254 self.prev_req_id_to_index: Optional[dict[str, int]] = None
255
256 @property
vllm/v1/worker/gpu_model_runner.py
-3
@@ -2305,9 +2305,6 @@ class GPUModelRunner(LoRAModelRunnerMixin, KVConnectorModelRunnerMixin):
2305 # These will be copied into input_ids in the next step
2306 # when preparing inputs.
2307 self.input_batch.prev_sampled_token_ids = sampled_token_ids
2308 - self.input_batch.prev_sampled_token_ids_invalid_indices = (
2309 - invalid_req_indices_set
2310 - )
2308 self.input_batch.prev_req_id_to_index = {
2309 req_id: i
2310 for i, req_id in enumerate(self.input_batch.req_ids)