From 8013634e9c4a85553b356ad1c8fbde92de9861a7 Mon Sep 17 00:00:00 2001 From: Shanshan Shen <467638484@qq.com> Date: Mon, 30 Jun 2025 17:39:19 +0800 Subject: [PATCH] [Structured Output] Remove redundant check for `grammar_bitmask` (#1459) ### What this PR does / why we need it? Remove redundant check since we have check this at https://github.com/vllm-project/vllm-ascend/blob/main/vllm_ascend/worker/model_runner_v1.py#L1450. Signed-off-by: shen-shanshan <467638484@qq.com> --- vllm_ascend/worker/model_runner_v1.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/vllm_ascend/worker/model_runner_v1.py b/vllm_ascend/worker/model_runner_v1.py index 3f99371..45bce58 100644 --- a/vllm_ascend/worker/model_runner_v1.py +++ b/vllm_ascend/worker/model_runner_v1.py @@ -1273,8 +1273,6 @@ class NPUModelRunner(LoRAModelRunnerMixin): # Serialization of np.ndarray is much more efficient than a tensor, # so we receive it in that format. grammar_bitmask = scheduler_output.grammar_bitmask - if grammar_bitmask is None: - return # We receive the structured output bitmask from the scheduler, but the # indices of the requests in the batch may not match the indices of