From 4672c4d035af58d304ab24dcb74a4a054570cce4 Mon Sep 17 00:00:00 2001 From: zhuhaoran Date: Sat, 13 Dec 2025 00:01:56 +0800 Subject: [PATCH] clean useless func comment Signed-off-by: zhuhaoran --- vllm/v1/worker/gpu_input_batch.py | 7 +++---- vllm/v1/worker/gpu_model_runner.py | 14 ++------------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/vllm/v1/worker/gpu_input_batch.py b/vllm/v1/worker/gpu_input_batch.py index ee2f6b9964e55..eff7e99933305 100644 --- a/vllm/v1/worker/gpu_input_batch.py +++ b/vllm/v1/worker/gpu_input_batch.py @@ -971,10 +971,9 @@ class InputBatch: num_draft_tokens: list[int] | None = None, ) -> None: """ - In async scheduling case, update spec_token_ids in sampling metadata - with real draft token ids from prior step. - This is called right before they are needed by the rejection sampler - for penalty/bad_words computation. + In async scheduling case, update spec_token_ids in sampling metadata with + real draft token ids from prior step. This is called right before they are + needed by the rejection sampler for penalty/bad_words computation. """ if draft_token_ids_cpu is None or self.prev_req_id_to_index is None: return diff --git a/vllm/v1/worker/gpu_model_runner.py b/vllm/v1/worker/gpu_model_runner.py index 0da2f082052d6..92b6ad31f4443 100644 --- a/vllm/v1/worker/gpu_model_runner.py +++ b/vllm/v1/worker/gpu_model_runner.py @@ -3403,12 +3403,7 @@ class GPUModelRunner( def _copy_draft_token_ids( self, draft_token_ids: torch.Tensor, num_reqs: int ) -> None: - """Copy draft token ids to CPU asynchronously. - - This is used for async scheduling with spec decode + penalty/bad_words. - The draft_token_ids will be used in the next step to update - input_batch.spec_token_ids for correct penalty/bad_words computation. - """ + """Copy draft token ids to CPU asynchronously.""" if self.draft_token_ids_copy_event is None or not isinstance( draft_token_ids, torch.Tensor ): @@ -3426,12 +3421,7 @@ class GPUModelRunner( self.draft_token_ids_copy_event.record() def _get_draft_token_ids_cpu(self) -> list[list[int]] | None: - """Get previously copied draft token ids from CPU. - - Called at the beginning of the next step to update spec_token_ids - for async scheduling with spec decode + penalty/bad_words. - Returns None if no draft tokens were copied in previous step. - """ + """Get previously copied draft token ids from CPU.""" if isinstance(self._draft_token_ids, list): return self._draft_token_ids