Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-vllm for openSUSE:Factory checked in at 2026-10-15 12:19:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-vllm (Old) and /work/SRC/openSUSE:Factory/.python-vllm.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-vllm" Thu Oct 15 12:19:47 2026 rev:12 rq:1384940 version:0.31.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-vllm/python-vllm.changes 2026-10-12 22:07:35.095219508 +0200 +++ /work/SRC/openSUSE:Factory/.python-vllm.new.3698736/python-vllm.changes 2026-10-15 12:20:56.639085877 +0200 @@ -1,0 +2,29 @@ +Thu Oct 15 04:59:03 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to version 0.31.0: + * Security: per-request mm_processor/media kwargs need + --trust-request-mm-kwargs; prefix-cache keys tagged by source + with LoRA path hashed; stale multimodal cache entries fixed + * --enable-mamba-fine-grained-prefix-cache renamed to + --enable-mamba-shared-prefix-checkpoint + * Invalid prompt_embeds rejected with 400; embeds state freed + with the request + * CPU: pre-built Triton CPU, Diamond Rapids FP8 W8A8, faster + Arm paged attention + * Breaking: tokenizer_mode="slow" removed; quantization="fp8" + is fp8_per_tensor; --enforce-eager skips JIT warmup + * Many more fixes and improvements; see upstream's release + notes for the full list +- CVE-2026-105775: Mamba "all"-mode block size not a multiple + of the chunk size corrupts the state write-back (boo#1284279) + * fix-CVE-2026-105775.patch rebased onto 0.31.0, still + unfixed upstream +- CVE-2026-105922: prompt-embeds positions fed stale token IDs + into the penalty kernels (boo#1284365) + * fix-CVE-2026-105922.patch rebased onto 0.31.0 for the + LogitsProcessor refactor, still unfixed upstream +- Rebase vllm-relax-cpu-requirements.patch (drop new upper bounds + Factory exceeds, oss-harmony to openai-harmony, optional + triton-cpu); point %prep at tools/use_existing_torch.py + +------------------------------------------------------------------- Old: ---- vllm-0.30.0.tar.gz New: ---- vllm-0.31.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-vllm.spec ++++++ --- /var/tmp/diff_new_pack.uoegch/_old 2026-10-15 12:21:00.995268083 +0200 +++ /var/tmp/diff_new_pack.uoegch/_new 2026-10-15 12:21:00.997268167 +0200 @@ -48,7 +48,7 @@ %define acl_version 52.6.0 %bcond_without libalternatives Name: python-vllm%{psuffix} -Version: 0.30.0 +Version: 0.31.0 Release: 0 Summary: A high-throughput and memory-efficient inference and serving engine for LLMs License: Apache-2.0 @@ -64,15 +64,15 @@ Source10: https://github.com/oneapi-src/oneDNN/archive/%{onednn_aarch64_commit}.tar.gz#/oneDNN-%{onednn_aarch64_commit_short}.tar.gz Source11: https://github.com/oneapi-src/oneDNN/archive/refs/tags/v%{onednn_x86_version}.tar.gz#/oneDNN-%{onednn_x86_version}.tar.gz Source12: https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v%{acl_version}.tar.gz#/ComputeLibrary-%{acl_version}.tar.gz -# PATCH-FIX-OPENSUSE vllm-relax-cpu-requirements.patch -- relax exact pins to what Factory ships and drop optional torchvision/torchaudio/torchcodec/intel-openmp +# PATCH-FIX-OPENSUSE vllm-relax-cpu-requirements.patch -- relax exact pins to what Factory ships and drop optional torchvision/torchaudio/torchcodec/intel-openmp/triton-cpu Patch0: vllm-relax-cpu-requirements.patch # PATCH-FIX-OPENSUSE vllm-cpu-disable-rust-frontend.patch -- do not build the ~575-crate Rust frontend (unvendorable offline; runtime-optional) Patch1: vllm-cpu-disable-rust-frontend.patch # PATCH-FIX-UPSTREAM vllm-thinking-budget-scan-cursor.patch boo#1280982 [email protected] -- CVE-2026-92365: resume the thinking-budget marker search from a cursor so a generation is not quadratic in its own length Patch2: vllm-thinking-budget-scan-cursor.patch -# PATCH-FIX-UPSTREAM fix-CVE-2026-105775.patch https://github.com/vllm-project/vllm/pull/57278 (unmerged as of 2026-10-12, rebased onto 0.30.0) -- CVE-2026-105775: keep the mamba block size a multiple of the chunk size so the "all" write-back reads states off chunk ends; DROP as obsolete when updating past the upstream removal of mamba_cache_mode "all" (#58997) +# PATCH-FIX-UPSTREAM fix-CVE-2026-105775.patch https://github.com/vllm-project/vllm/pull/57278 (unmerged as of 2026-10-15, rebased onto 0.31.0) -- CVE-2026-105775: keep the mamba block size a multiple of the chunk size so the "all" write-back reads states off chunk ends; DROP as obsolete when updating past the upstream removal of mamba_cache_mode "all" (#58997) Patch3: fix-CVE-2026-105775.patch -# PATCH-FIX-UPSTREAM fix-CVE-2026-105922.patch https://github.com/vllm-project/vllm/pull/57762 (open/unmerged as of 2026-10-12, rebased onto 0.30.0) -- CVE-2026-105922: treat prompt-embedding positions as invalid token IDs so penalty kernels do not index stale CPU token buffer contents +# PATCH-FIX-UPSTREAM fix-CVE-2026-105922.patch https://github.com/vllm-project/vllm/pull/57762 (open/unmerged as of 2026-10-15, rebased onto 0.31.0) -- CVE-2026-105922: treat prompt-embedding positions as invalid token IDs so penalty kernels do not index stale CPU token buffer contents Patch4: fix-CVE-2026-105922.patch BuildRequires: %{python_module Jinja2} # Runtime modules imported eagerly by "import vllm" (needed for the %%check smoke test). @@ -145,6 +145,12 @@ Requires: python-numba >= 0.65.0 Requires: python-numpy Requires: python-openai >= 2.25.0 +# Upstream 0.31.0 asks for oss-harmony >= 0.0.11, a fork shipping the same +# openai_harmony module with embedded vocabularies. Factory carries only +# openai-harmony, which provides that same module, so keep requiring it: +# vllm-relax-cpu-requirements.patch maps the requirement back in the wheel +# metadata too, so the installed dist-info does not assert a requirement +# the RPM cannot satisfy. Requires: python-openai-harmony >= 0.0.3 Requires: python-opencv >= 4.13.0 Requires: python-opentelemetry-api >= 1.27.0 @@ -246,7 +252,7 @@ # Build against whatever torch the build root provides instead of upstream's # exact 2.13.0 pin, via vLLM's own helper. Strips torch/torchvision/torchaudio # pins from requirements/*.txt and pyproject.toml. -%python_expand $python use_existing_torch.py --prefix +%python_expand $python tools/use_existing_torch.py --prefix %build export VLLM_TARGET_DEVICE=%{vllm_target_device} ++++++ fix-CVE-2026-105775.patch ++++++ --- /var/tmp/diff_new_pack.uoegch/_old 2026-10-15 12:21:01.039269924 +0200 +++ /var/tmp/diff_new_pack.uoegch/_new 2026-10-15 12:21:01.043270091 +0200 @@ -3,7 +3,7 @@ chunk size References: CVE-2026-105775, boo#1284279 Upstream-PR: https://github.com/vllm-project/vllm/pull/57278 (CLOSED UNMERGED, - needs-rebase; unmerged as of 2026-10-12, rebased onto 0.30.0) + needs-rebase; unmerged as of 2026-10-15, rebased onto 0.31.0) With mamba_cache_mode "all", _align_hybrid_block_size drops the model's mamba chunk size from the block alignment as soon as --mamba-block-size is @@ -34,16 +34,6 @@ Co-authored-by: Claude <[email protected]> Signed-off-by: Tianyao Wu <[email protected]> --- - .../core/test_mamba_block_size_alignment.py | 115 ++++++++++++++++++ - vllm/config/cache.py | 7 +- - vllm/platforms/interface.py | 12 +- - vllm/v1/attention/backends/mamba2_attn.py | 8 ++ - 4 files changed, 139 insertions(+), 3 deletions(-) - create mode 100644 tests/v1/core/test_mamba_block_size_alignment.py - -diff --git a/tests/v1/core/test_mamba_block_size_alignment.py b/tests/v1/core/test_mamba_block_size_alignment.py -new file mode 100644 -index 000000000000..29389940a700 --- /dev/null +++ b/tests/v1/core/test_mamba_block_size_alignment.py @@ -0,0 +1,115 @@ @@ -162,11 +152,9 @@ + f"which no chunk end lands on" + ) + assert block_size == expected -diff --git a/vllm/config/cache.py b/vllm/config/cache.py -index 37ad5b2b34fe..e2b6dd3d1bd9 100644 --- a/vllm/config/cache.py +++ b/vllm/config/cache.py -@@ -166,7 +166,12 @@ class CacheConfig: +@@ -178,7 +178,12 @@ mamba_block_size: int | None = Field(default=None, gt=0) """Size of a contiguous cache block in number of tokens for mamba cache. Can be set only when prefix caching is enabled. @@ -180,11 +168,9 @@ mamba_cache_dtype: MambaDType = "auto" """The data type to use for the Mamba cache (both the conv as well as the ssm state). If set to 'auto', the data type will be inferred from the model -diff --git a/vllm/platforms/interface.py b/vllm/platforms/interface.py -index 13e5b55402c6..596031b719a6 100644 --- a/vllm/platforms/interface.py +++ b/vllm/platforms/interface.py -@@ -896,8 +896,16 @@ def _align_hybrid_block_size( +@@ -967,8 +967,16 @@ # TODO(tdoublep): this constraint can be relaxed fairly # easily by changing the way we layout chunks in the # mamba2 kernels. @@ -203,11 +189,9 @@ attn_tokens_per_mamba_state = cdiv(mamba_page_size, attn_page_size_1_token) chunk_size = lcm(base_chunk_size, kernel_block_alignment_size) attn_block_size = chunk_size * cdiv(attn_tokens_per_mamba_state, chunk_size) -diff --git a/vllm/v1/attention/backends/mamba2_attn.py b/vllm/v1/attention/backends/mamba2_attn.py -index 0a4584632dca..82261e3c065d 100644 --- a/vllm/v1/attention/backends/mamba2_attn.py +++ b/vllm/v1/attention/backends/mamba2_attn.py -@@ -128,6 +128,14 @@ def __init__( +@@ -128,6 +128,14 @@ "chunk_size needs to be set in the model config for Mamba2 models" ) self.chunk_size: int = chunk_size ++++++ fix-CVE-2026-105922.patch ++++++ --- /var/tmp/diff_new_pack.uoegch/_old 2026-10-15 12:21:01.057270677 +0200 +++ /var/tmp/diff_new_pack.uoegch/_new 2026-10-15 12:21:01.060270802 +0200 @@ -2,7 +2,7 @@ Subject: [PATCH] Fix penalties with prompt embeddings References: CVE-2026-105922, boo#1284365 Upstream-PR: https://github.com/vllm-project/vllm/pull/57762 (OPEN, blocked - on rebase; open/unmerged as of 2026-10-12, rebased onto 0.30.0) + on rebase; open/unmerged as of 2026-10-15, rebased onto 0.31.0) Treat prompt embedding positions as invalid token IDs when building sampling metadata. This prevents penalty kernels from indexing stale CPU token buffer @@ -16,23 +16,22 @@ skip embed positions for mixed prompts and the whole prompt for pure prompt-embeds requests. -Rebased onto 0.30.0: the MRV2 sampler/penalties plumbing in this tree -still uses RequestState directly (no LogitsProcRequestState yet), so the -PenaltiesState/Sampler signatures are extended in place and the -model_runner passes model_state.prompt_embeds_state through; the triton -bincount masking and the gpu_input_batch CPU-tensor pad are upstream's. +Rebased onto 0.31.0: the MRV2 sampler/penalties plumbing in this tree +now uses LogitsProcRequestState behind the LogitsProcessor interface, so +the PenaltiesState/Sampler signatures are extended in place (optional +prompt_embeds_state, default None) and the model_runner passes +model_state.prompt_embeds_state through; the triton bincount masking and +the gpu_input_batch CPU-tensor pad are upstream's. Co-authored-by: Nick Hill <[email protected]> Signed-off-by: cross2pro <[email protected]> --- - -diff -Naur a/tests/v1/worker/test_gpu_input_batch.py b/tests/v1/worker/test_gpu_input_batch.py ---- a/tests/v1/worker/test_gpu_input_batch.py 2026-09-22 07:00:46.000000000 +0200 -+++ b/tests/v1/worker/test_gpu_input_batch.py 2026-10-12 10:29:33.473825773 +0200 -@@ -511,3 +511,35 @@ - assert metadata.get_prompt_token_ids_cpu()[0].tolist() == req.prompt_token_ids - else: - assert metadata.prompt_token_ids_cpu is None +--- a/tests/v1/worker/test_gpu_input_batch.py ++++ b/tests/v1/worker/test_gpu_input_batch.py +@@ -711,3 +711,35 @@ + input_batch.condense() + + assert req_index not in input_batch.req_prompt_embeds + + +def test_sampling_metadata_prompt_embeds_use_vocab_size_as_token_id_pad(): @@ -65,117 +64,18 @@ + + assert metadata.prompt_token_ids is not None + assert metadata.prompt_token_ids[0].tolist() == [VOCAB_SIZE] * 3 -diff -Naur a/tests/v1/worker/test_gpu_penalties.py b/tests/v1/worker/test_gpu_penalties.py ---- a/tests/v1/worker/test_gpu_penalties.py 1970-01-01 01:00:00.000000000 +0100 -+++ b/tests/v1/worker/test_gpu_penalties.py 2026-10-12 10:29:44.923112854 +0200 -@@ -0,0 +1,93 @@ -+# SPDX-License-Identifier: Apache-2.0 -+# SPDX-FileCopyrightText: Copyright contributors to the vLLM project -+ -+import numpy as np -+import pytest -+import torch -+ -+pytest.importorskip("triton") -+if not torch.cuda.is_available(): -+ pytest.skip( -+ "CUDA required for Model Runner V2 penalties tests", -+ allow_module_level=True, -+ ) -+ -+from vllm.sampling_params import SamplingParams -+from vllm.v1.core.sched.output import NewRequestData -+from vllm.v1.worker.gpu.model_states.prompt_embeds import PromptEmbedsState -+from vllm.v1.worker.gpu.sample.penalties import PenaltiesState -+from vllm.v1.worker.gpu.states import RequestState -+ -+DEVICE = torch.device("cuda") -+VOCAB_SIZE = 128 -+HIDDEN_SIZE = 8 -+ -+ -+def _new_req_data( -+ req_id: str, -+ embeds_len: int = 0, -+ prompt_is_token_ids: list[bool] | None = None, -+) -> NewRequestData: -+ return NewRequestData( -+ req_id=req_id, -+ prompt_token_ids=None, -+ mm_features=[], -+ sampling_params=None, -+ pooling_params=None, -+ block_ids=([],), -+ num_computed_tokens=0, -+ lora_request=None, -+ prompt_embeds=(torch.zeros(embeds_len, HIDDEN_SIZE) if embeds_len else None), -+ prompt_is_token_ids=prompt_is_token_ids, -+ ) -+ -+ -+def _prompt_bin_tokens(penalties: PenaltiesState, req_idx: int) -> set[int]: -+ words = penalties.prompt_bin_mask[req_idx].cpu().numpy().astype(np.uint32) -+ return {t for t in range(VOCAB_SIZE) if words[t // 32] & (1 << (t % 32))} -+ -+ -+def test_bincount_ignores_prompt_embeds_positions(): -+ """Prompt-embedding positions must not contribute to the prompt bin mask. -+ -+ `all_token_ids` holds placeholder zeros at prompt-embedding positions, so -+ without masking the bincount would count token 0 as a prompt token and the -+ repetition penalty would wrongly scale its logit. -+ """ -+ req_states = RequestState( -+ max_num_reqs=3, -+ max_model_len=64, -+ max_num_batched_tokens=64, -+ num_speculative_steps=1, -+ vocab_size=VOCAB_SIZE, -+ device=DEVICE, -+ ) -+ pe_state = PromptEmbedsState(3, HIDDEN_SIZE, torch.bfloat16, DEVICE) -+ -+ # Ordinary token prompt. -+ req_states.add_request("tok", 3, [5, 6, 7], 0, 16) -+ # Pure prompt-embeds prompt: all positions are placeholder zeros. -+ req_states.add_request("embeds", 3, [0, 0, 0], 0, 16) -+ # Mixed prompt: position 1 is an embedding (placeholder zero). -+ req_states.add_request("mixed", 3, [9, 0, 10], 0, 16) -+ pe_state.add_request(req_states.req_id_to_index["tok"], _new_req_data("tok")) -+ pe_state.add_request( -+ req_states.req_id_to_index["embeds"], _new_req_data("embeds", embeds_len=3) -+ ) -+ pe_state.add_request( -+ req_states.req_id_to_index["mixed"], -+ _new_req_data("mixed", embeds_len=3, prompt_is_token_ids=[True, False, True]), -+ ) -+ req_states.apply_staged_writes() -+ pe_state.apply_staged_writes() -+ -+ penalties = PenaltiesState(req_states, pe_state) -+ params = SamplingParams(repetition_penalty=1.1) -+ for req_idx in range(3): -+ penalties.add_request(req_idx, params) -+ penalties.apply_staged_writes() -+ -+ idx = req_states.req_id_to_index -+ assert _prompt_bin_tokens(penalties, idx["tok"]) == {5, 6, 7} -+ assert _prompt_bin_tokens(penalties, idx["embeds"]) == set() -+ assert _prompt_bin_tokens(penalties, idx["mixed"]) == {9, 10} -diff -Naur a/vllm/v1/worker/gpu/model_runner.py b/vllm/v1/worker/gpu/model_runner.py ---- a/vllm/v1/worker/gpu/model_runner.py 2026-09-22 07:00:46.000000000 +0200 -+++ b/vllm/v1/worker/gpu/model_runner.py 2026-10-12 10:29:09.075082970 +0200 -@@ -469,6 +469,7 @@ +--- a/vllm/v1/worker/gpu/model_runner.py ++++ b/vllm/v1/worker/gpu/model_runner.py +@@ -463,6 +463,7 @@ "enable_trace_replay": self.model_config.enable_trace_replay, - "reasoning_config": self.vllm_config.reasoning_config, "return_sampling_mask": self.model_config.return_sampling_mask, + "custom_logits_processors": custom_logits_processors, + "prompt_embeds_state": self.model_state.prompt_embeds_state, } if self.vllm_config.watermark_config is None: self.sampler = Sampler(**sampler_kwargs) -diff -Naur a/vllm/v1/worker/gpu/model_states/interface.py b/vllm/v1/worker/gpu/model_states/interface.py ---- a/vllm/v1/worker/gpu/model_states/interface.py 2026-09-22 06:51:49.000000000 +0200 -+++ b/vllm/v1/worker/gpu/model_states/interface.py 2026-10-12 10:29:21.748507663 +0200 +--- a/vllm/v1/worker/gpu/model_states/interface.py ++++ b/vllm/v1/worker/gpu/model_states/interface.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project @@ -195,7 +95,7 @@ class ModelSpecificAttnMetadata: """Base class for model-specific attention metadata.""" -@@ -46,6 +49,10 @@ +@@ -42,6 +45,10 @@ supports_prompt_embeds: ClassVar[bool] = False """Whether this state implements user-provided prompt embeddings.""" @@ -206,38 +106,29 @@ def __init__( self, vllm_config: VllmConfig, -diff -Naur a/vllm/v1/worker/gpu/sample/penalties.py b/vllm/v1/worker/gpu/sample/penalties.py ---- a/vllm/v1/worker/gpu/sample/penalties.py 2026-09-22 07:00:46.000000000 +0200 -+++ b/vllm/v1/worker/gpu/sample/penalties.py 2026-10-12 10:28:54.045393396 +0200 -@@ -1,5 +1,7 @@ - # SPDX-License-Identifier: Apache-2.0 - # SPDX-FileCopyrightText: Copyright contributors to the vLLM project -+from typing import TYPE_CHECKING -+ - import numpy as np - import torch +--- a/vllm/v1/worker/gpu/sample/penalties.py ++++ b/vllm/v1/worker/gpu/sample/penalties.py +@@ -18,11 +18,18 @@ -@@ -10,10 +12,18 @@ - from vllm.v1.worker.gpu.buffer_utils import UvaBackedTensor - from vllm.v1.worker.gpu.states import RequestState - -+if TYPE_CHECKING: + if TYPE_CHECKING: + from vllm.config import VllmConfig + from vllm.v1.worker.gpu.model_states.prompt_embeds import PromptEmbedsState -+ - class PenaltiesState: -- def __init__(self, req_states: RequestState): + + class PenaltiesState(LogitsProcessor): +- def __init__(self, vllm_config: "VllmConfig", req_states: LogitsProcRequestState): + def __init__( + self, -+ req_states: RequestState, ++ vllm_config: "VllmConfig", ++ req_states: LogitsProcRequestState, + prompt_embeds_state: "PromptEmbedsState | None" = None, + ): self.req_states = req_states + self.prompt_embeds_state = prompt_embeds_state - + self.device = req_states.device max_num_reqs = req_states.max_num_reqs - self.vocab_size = req_states.vocab_size -@@ -63,6 +73,7 @@ + vocab_size = req_states.vocab_size +@@ -67,6 +74,7 @@ prefill_lens = self.req_states.prefill_len.np[self._new_penalties_reqs] max_prefill_len = int(prefill_lens.max()) @@ -245,7 +136,7 @@ bincount( idx_mapping, self.req_states.all_token_ids.gpu, -@@ -71,6 +82,8 @@ +@@ -75,6 +83,8 @@ self.prompt_bin_mask, self.output_bin_counts, max_prefill_len, @@ -254,7 +145,7 @@ ) self._new_penalties_reqs.clear() -@@ -222,10 +235,13 @@ +@@ -220,10 +230,13 @@ all_token_ids_stride, prompt_len_ptr, prefill_len_ptr, @@ -268,7 +159,7 @@ BLOCK_SIZE: tl.constexpr, ): token_idx = tl.program_id(0) -@@ -240,6 +256,19 @@ +@@ -238,6 +251,19 @@ block = block_idx * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE) if block_idx * BLOCK_SIZE < prompt_len: mask = block < prompt_len @@ -288,7 +179,7 @@ prompt_tokens = tl.load( all_token_ids_ptr + req_state_idx * all_token_ids_stride + block, mask=mask ) -@@ -275,6 +304,8 @@ +@@ -273,6 +299,8 @@ prompt_bin_mask: torch.Tensor, output_bin_counts: torch.Tensor, max_prefill_len: int, @@ -297,7 +188,7 @@ ) -> None: # Use index_fill_ instead of `tensor[idx] = 0` to avoid sync. idx_long = expanded_idx_mapping.long() -@@ -283,16 +314,20 @@ +@@ -281,16 +309,20 @@ num_tokens = expanded_idx_mapping.shape[0] BLOCK_SIZE = 1024 num_blocks = triton.cdiv(max_prefill_len, BLOCK_SIZE) @@ -318,19 +209,17 @@ BLOCK_SIZE=BLOCK_SIZE, ) -diff -Naur a/vllm/v1/worker/gpu/sample/sampler.py b/vllm/v1/worker/gpu/sample/sampler.py ---- a/vllm/v1/worker/gpu/sample/sampler.py 2026-09-22 07:00:46.000000000 +0200 -+++ b/vllm/v1/worker/gpu/sample/sampler.py 2026-10-12 10:30:14.494437137 +0200 -@@ -1,6 +1,8 @@ - # SPDX-License-Identifier: Apache-2.0 +--- a/vllm/v1/worker/gpu/sample/sampler.py ++++ b/vllm/v1/worker/gpu/sample/sampler.py +@@ -2,6 +2,7 @@ # SPDX-FileCopyrightText: Copyright contributors to the vLLM project + from collections.abc import Sequence +from typing import TYPE_CHECKING -+ + import numpy as np import torch - -@@ -29,6 +31,9 @@ +@@ -38,6 +39,9 @@ from vllm.v1.worker.gpu.sample.trace_replay import TraceReplayState from vllm.v1.worker.gpu.states import RequestState @@ -340,29 +229,28 @@ class Sampler: def __init__( -@@ -43,6 +48,7 @@ +@@ -53,6 +57,7 @@ enable_trace_replay: bool = False, - reasoning_config: ReasoningConfig | None = None, return_sampling_mask: bool = False, + custom_logits_processors: Sequence[LogitsProcessor] = (), + prompt_embeds_state: "PromptEmbedsState | None" = None, ): self.logprobs_mode = logprobs_mode self.compute_nans = envs.VLLM_COMPUTE_NANS_IN_LOGITS # False by default. -@@ -50,7 +56,9 @@ - - self.req_states = req_states +@@ -62,7 +67,9 @@ self.sampling_states = SamplingStates(max_num_reqs, vocab_size) -- self.penalties_state = PenaltiesState(req_states) + + lp_req_state = LogitsProcRequestState.from_request_state(req_states) +- self.penalties_state = PenaltiesState(vllm_config, lp_req_state) + self.penalties_state = PenaltiesState( -+ req_states, prompt_embeds_state ++ vllm_config, lp_req_state, prompt_embeds_state + ) - self.logit_bias_state = LogitBiasState(max_num_reqs, device) - self.bad_words_state = BadWordsState(req_states) - self.logprob_token_ids_state = LogprobTokenIdsState(max_num_reqs, device) -diff -Naur a/vllm/v1/worker/gpu_input_batch.py b/vllm/v1/worker/gpu_input_batch.py ---- a/vllm/v1/worker/gpu_input_batch.py 2026-09-22 07:00:46.000000000 +0200 -+++ b/vllm/v1/worker/gpu_input_batch.py 2026-10-12 10:28:35.011253658 +0200 -@@ -996,6 +996,9 @@ + logit_bias_state = LogitBiasState(vllm_config, lp_req_state) + bad_words_state = BadWordsState(vllm_config, lp_req_state) + +--- a/vllm/v1/worker/gpu_input_batch.py ++++ b/vllm/v1/worker/gpu_input_batch.py +@@ -993,6 +993,9 @@ # token_id of this value. for i in range(num_reqs): prompt_token_ids[i, self.num_prompt_tokens[i] :] = self.vocab_size @@ -372,4 +260,104 @@ return prompt_token_ids_cpu_tensor def make_lora_inputs( +--- /dev/null ++++ b/tests/v1/worker/test_gpu_penalties.py +@@ -0,0 +1,97 @@ ++# SPDX-License-Identifier: Apache-2.0 ++# SPDX-FileCopyrightText: Copyright contributors to the vLLM project ++ ++import numpy as np ++import pytest ++import torch ++ ++pytest.importorskip("triton") ++if not torch.cuda.is_available(): ++ pytest.skip( ++ "CUDA required for Model Runner V2 penalties tests", ++ allow_module_level=True, ++ ) ++ ++from vllm.sampling_params import SamplingParams ++from vllm.v1.core.sched.output import NewRequestData ++from vllm.v1.worker.gpu.model_states.prompt_embeds import PromptEmbedsState ++from vllm.v1.worker.gpu.sample.logits_processor.interface import ( ++ LogitsProcRequestState, ++) ++from vllm.v1.worker.gpu.sample.penalties import PenaltiesState ++from vllm.v1.worker.gpu.states import RequestState ++ ++DEVICE = torch.device("cuda") ++VOCAB_SIZE = 128 ++HIDDEN_SIZE = 8 ++ ++ ++def _new_req_data( ++ req_id: str, ++ embeds_len: int = 0, ++ prompt_is_token_ids: list[bool] | None = None, ++) -> NewRequestData: ++ return NewRequestData( ++ req_id=req_id, ++ prompt_token_ids=None, ++ mm_features=[], ++ sampling_params=None, ++ pooling_params=None, ++ block_ids=([],), ++ num_computed_tokens=0, ++ lora_request=None, ++ prompt_embeds=(torch.zeros(embeds_len, HIDDEN_SIZE) if embeds_len else None), ++ prompt_is_token_ids=prompt_is_token_ids, ++ ) ++ ++ ++def _prompt_bin_tokens(penalties: PenaltiesState, req_idx: int) -> set[int]: ++ words = penalties.prompt_bin_mask[req_idx].cpu().numpy().astype(np.uint32) ++ return {t for t in range(VOCAB_SIZE) if words[t // 32] & (1 << (t % 32))} ++ ++ ++def test_bincount_ignores_prompt_embeds_positions(): ++ """Prompt-embedding positions must not contribute to the prompt bin mask. ++ ++ `all_token_ids` holds placeholder zeros at prompt-embedding positions, so ++ without masking the bincount would count token 0 as a prompt token and the ++ repetition penalty would wrongly scale its logit. ++ """ ++ req_states = RequestState( ++ max_num_reqs=3, ++ max_model_len=64, ++ max_num_batched_tokens=64, ++ num_speculative_steps=1, ++ vocab_size=VOCAB_SIZE, ++ device=DEVICE, ++ ) ++ pe_state = PromptEmbedsState(3, HIDDEN_SIZE, torch.bfloat16, DEVICE) ++ ++ # Ordinary token prompt. ++ req_states.add_request("tok", 3, [5, 6, 7], 0, 16) ++ # Pure prompt-embeds prompt: all positions are placeholder zeros. ++ req_states.add_request("embeds", 3, [0, 0, 0], 0, 16) ++ # Mixed prompt: position 1 is an embedding (placeholder zero). ++ req_states.add_request("mixed", 3, [9, 0, 10], 0, 16) ++ pe_state.add_request(req_states.req_id_to_index["tok"], _new_req_data("tok")) ++ pe_state.add_request( ++ req_states.req_id_to_index["embeds"], _new_req_data("embeds", embeds_len=3) ++ ) ++ pe_state.add_request( ++ req_states.req_id_to_index["mixed"], ++ _new_req_data("mixed", embeds_len=3, prompt_is_token_ids=[True, False, True]), ++ ) ++ req_states.apply_staged_writes() ++ pe_state.apply_staged_writes() ++ ++ lp_req_state = LogitsProcRequestState.from_request_state(req_states) ++ penalties = PenaltiesState(None, lp_req_state, pe_state) ++ params = SamplingParams(repetition_penalty=1.1) ++ for req_idx in range(3): ++ penalties.add_request(req_idx, params) ++ penalties.apply_staged_writes() ++ ++ idx = req_states.req_id_to_index ++ assert _prompt_bin_tokens(penalties, idx["tok"]) == {5, 6, 7} ++ assert _prompt_bin_tokens(penalties, idx["embeds"]) == set() ++ assert _prompt_bin_tokens(penalties, idx["mixed"]) == {9, 10} ++++++ vllm-0.30.0.tar.gz -> vllm-0.31.0.tar.gz ++++++ /work/SRC/openSUSE:Factory/python-vllm/vllm-0.30.0.tar.gz /work/SRC/openSUSE:Factory/.python-vllm.new.3698736/vllm-0.31.0.tar.gz differ: char 5, line 1 ++++++ vllm-relax-cpu-requirements.patch ++++++ --- /var/tmp/diff_new_pack.uoegch/_old 2026-10-15 12:21:01.104272643 +0200 +++ /var/tmp/diff_new_pack.uoegch/_new 2026-10-15 12:21:01.107272768 +0200 @@ -1,14 +1,14 @@ --- a/requirements/cpu.txt +++ b/requirements/cpu.txt -@@ -1,25 +1,13 @@ +@@ -1,30 +1,13 @@ # Common dependencies -r common.txt -setuptools==77.0.3 # this version can reuse CMake build dir +setuptools>=77.0.3 # this version can reuse CMake build dir --numba == 0.65.0; platform_machine != "s390x" # Required for N-gram speculative decoding -+numba >= 0.65.0; platform_machine != "s390x" # Required for N-gram speculative decoding +-numba == 0.65.0 # Required for N-gram speculative decoding ++numba >= 0.65.0 # Required for N-gram speculative decoding # Dependencies for CPUs -torch==2.13.0+cpu; platform_machine == "x86_64" or platform_machine == "s390x" or platform_machine == "aarch64" @@ -18,13 +18,18 @@ -torchaudio; platform_machine != "s390x" and platform_machine != "riscv64" - -# required for the image processor of phi3v, this must be updated alongside torch --torchvision; platform_machine != "s390x" and platform_machine != "riscv64" +-torchvision; platform_machine != "riscv64" - -# required for the torchcodec video decoding backend --torchcodec >= 0.14; platform_machine != "s390x" and platform_machine != "riscv64" and platform_machine != "ppc64le" +-torchcodec >= 0.14; platform_machine != "riscv64" and platform_machine != "ppc64le" - -# Intel Extension for PyTorch, only for x86_64 CPUs -intel-openmp==2024.2.1; platform_machine == "x86_64" +- +-# triton-cpu, only for x86_64 CPUs +-triton @ https://github.com/triton-lang/triton-cpu/releases/download/v3.8.0/triton-3.8.0+cpu-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_machine == "x86_64" and python_version == "3.10" +-triton @ https://github.com/triton-lang/triton-cpu/releases/download/v3.8.0/triton-3.8.0+cpu-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_machine == "x86_64" and python_version == "3.11" +-triton @ https://github.com/triton-lang/triton-cpu/releases/download/v3.8.0/triton-3.8.0+cpu-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ; platform_machine == "x86_64" and python_version >= "3.12" +torch>=2.12.0; platform_machine == "x86_64" or platform_machine == "s390x" or platform_machine == "aarch64" +torch>=2.12.0; platform_system == "Darwin" or platform_machine == "ppc64le" or platform_machine == "riscv64" @@ -32,7 +37,23 @@ py-cpuinfo; platform_machine == "aarch64" --- a/requirements/common.txt +++ b/requirements/common.txt -@@ -21,10 +21,10 @@ +@@ -7,13 +7,13 @@ + tqdm + blake3 + py-cpuinfo +-transformers >= 5.10.4, < 5.18.0 ++transformers >= 5.10.4 + huggingface_hub >= 1.31.0 # Required for the `huggingface_hub.utils.httpx` re-export + tokenizers >= 0.21.1 # Required for fast incremental detokenization. + safetensors >= 0.6.2 # MXFP4/MXFP6 dtype support (F8_E8M0, F4) added in 0.6.0: https://github.com/huggingface/safetensors/pull/611 + protobuf >= 5.29.6, !=6.30.*, !=6.31.*, !=6.32.*, !=6.33.0.*, !=6.33.1.*, !=6.33.2.*, !=6.33.3.*, !=6.33.4.*; platform_machine != "s390x" + protobuf == 7.36.1; platform_machine == "s390x" +-fastapi[standard] >= 0.133.0, < 0.137.0 # First version supporting Starlette 1.0; < 0.137.0 avoids route-tree change that breaks model-hosting-container-standards handler overrides. ++fastapi[standard] >= 0.133.0 # First version supporting Starlette 1.0. + starlette >= 1.0.1 # CVE-2026-48710: Host header injection in < 1.0.1 + aiohttp >= 3.13.3 + openai >= 2.25.0 # For Responses API with namespace tools +@@ -22,11 +22,11 @@ pillow # Required for image processing prometheus-fastapi-instrumentator >= 8.0.0 # v8 unblocks starlette >= 1.0 tiktoken >= 0.6.0 # Required for DBRX tokenizer @@ -41,12 +62,14 @@ llguidance >= 1.7.0, < 1.8.0; platform_machine == "x86_64" or platform_machine == "arm64" or platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "s390x" -outlines_core == 0.2.14 -lark == 1.2.2 +-xgrammar == 0.2.7; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64" or platform_machine == "s390x" or platform_machine == "ppc64le" +outlines_core >= 0.2.14 +lark >= 1.2.2 - xgrammar >= 0.2.1, < 1.0.0; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64" or platform_machine == "s390x" or platform_machine == "ppc64le" ++xgrammar >= 0.2.1; platform_machine == "x86_64" or platform_machine == "aarch64" or platform_machine == "arm64" or platform_machine == "s390x" or platform_machine == "ppc64le" typing_extensions >= 4.10 filelock >= 3.16.1 # need to contain https://github.com/tox-dev/filelock/pull/317 -@@ -38,8 +38,8 @@ + partial-json-parser # used for parsing partial JSON outputs +@@ -39,8 +39,8 @@ six>=1.16.0; python_version > '3.11' # transitive dependency of pandas that needs to be the latest version for python 3.12 setuptools>=77.0.3,<81.0.0; python_version > '3.11' # Setuptools is used by triton, we need to ensure a modern version is installed for 3.12+ so that it does not try to import distutils, which was removed in 3.12 einops # Required for Qwen2-VL. @@ -57,8 +80,12 @@ cloudpickle # allows pickling lambda functions in model_executor/models/registry.py watchfiles # required for http server to monitor the updates of TLS files python-json-logger # Used by logging as per examples/features/logging_configuration.md -@@ -51,7 +51,7 @@ - openai-harmony >= 0.0.3 # Required for gpt-oss +@@ -49,10 +49,10 @@ + cbor2 # Required for cross-language serialization of hashable objects + ijson # Required for mistral streaming tool parser + setproctitle # Used to set process names for better debugging and monitoring +-oss-harmony >= 0.0.11 # Required for gpt-oss; includes embedded vocabularies ++openai-harmony >= 0.0.3 # Required for gpt-oss anthropic >= 0.71.0 model-hosting-container-standards >= 0.1.14, < 1.0.0 -mcp >= 2.0.0, < 3.0.0
