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 9, 07:30 UTC
[Deprecation] Deprecate `seed_everything` and `scatter_mm_placeholders` in v0.15 (#33362)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
Jan 30, 2026 at 21:54 UTC
010ec0c30ef1fa481fc69b8a5d2c205052d93607
3 files changed
-75
vllm/model_executor/models/voxtral.py
-8
@@ -103,14 +103,6 @@ class VoxtralProcessorAdapter:
103
def begin_audio_token_id(self) -> int:
104
return self._audio_processor.special_ids.begin_audio
105
106
- # @cached_property
107
- # def begin_transcript_token_id(self) -> int:
108
- # return self._audio_processor.special_ids.begin_transcript
109
-
110
- # @cached_property
111
- # def end_transcript_token_id(self) -> int:
112
- # return self._audio_processor.special_ids.end_transcript
113
-
106
@cached_property
107
def sampling_rate(self) -> int:
108
return self._audio_processor.audio_config.sampling_rate
vllm/platforms/interface.py
-20
@@ -4,14 +4,11 @@ import contextlib
4
import enum
5
import os
6
import platform
7
-import random
7
import sys
8
from datetime import timedelta
9
from typing import TYPE_CHECKING, Any, NamedTuple
10
12
-import numpy as np
11
import torch
14
-from typing_extensions import deprecated
12
13
from vllm.logger import init_logger
14
from vllm.v1.attention.backends.registry import AttentionBackendEnum
@@ -365,23 +362,6 @@ class Platform:
362
"""
363
return torch.inference_mode(mode=True)
364
368
- @classmethod
369
- @deprecated(
370
- "`seed_everything` is deprecated. It will be removed in v0.15.0 or later. "
371
- "Please use `vllm.utils.torch_utils.set_random_seed` instead."
372
- )
373
- def seed_everything(cls, seed: int | None = None) -> None:
374
- """
375
- Set the seed of each random module.
376
- `torch.manual_seed` will set seed on all devices.
377
-
378
- Loosely based on: https://github.com/Lightning-AI/pytorch-lightning/blob/2.4.0/src/lightning/fabric/utilities/seed.py#L20
379
- """
380
- if seed is not None:
381
- random.seed(seed)
382
- np.random.seed(seed)
383
- torch.manual_seed(seed)
384
-
365
@classmethod
366
def set_device(cls, device: torch.device) -> None:
367
"""
vllm/v1/worker/utils.py
-47
@@ -5,7 +5,6 @@ from collections import defaultdict
5
from dataclasses import dataclass, field
6
7
import torch
8
-from typing_extensions import deprecated
8
9
from vllm.config import CacheConfig, VllmConfig
10
from vllm.logger import init_logger
@@ -201,52 +200,6 @@ def sanity_check_mm_encoder_outputs(
200
)
201
202
204
-@deprecated("`scatter_mm_placeholders` is deprecated and will be removed in v0.15.0.")
205
-def scatter_mm_placeholders(
206
- embeds: torch.Tensor,
207
- is_embed: torch.Tensor | None,
208
-) -> torch.Tensor:
209
- """
210
- Scatter the multimodal embeddings into a contiguous tensor that represents
211
- the placeholder tokens.
212
-
213
- [`vllm.multimodal.processing.PromptUpdateDetails.is_embed`][].
214
-
215
- Args:
216
- embeds: The multimodal embeddings.
217
- Shape: `(num_embeds, embed_dim)`
218
- is_embed: A boolean mask indicating which positions in the placeholder
219
- tokens need to be filled with multimodal embeddings.
220
- Shape: `(num_placeholders, num_embeds)`
221
- """
222
- if is_embed is None:
223
- return embeds
224
-
225
- placeholders = embeds.new_full(
226
- (is_embed.shape[0], embeds.shape[-1]),
227
- fill_value=torch.nan,
228
- )
229
- placeholders[is_embed] = embeds
230
- return placeholders
231
-
232
-
233
-@deprecated("`gather_mm_placeholders` is deprecated and will be removed in v0.15.0.")
234
-def gather_mm_placeholders(
235
- placeholders: torch.Tensor,
236
- is_embed: torch.Tensor | None,
237
-) -> torch.Tensor:
238
- """
239
- Reconstructs the embeddings from the placeholder tokens.
240
-
241
- This is the operation of [`scatter_mm_placeholders`]
242
- [vllm.v1.worker.utils.scatter_mm_placeholders].
243
- """
244
- if is_embed is None:
245
- return placeholders
246
-
247
- return placeholders[is_embed]
248
-
249
-
203
def request_memory(init_snapshot: MemorySnapshot, cache_config: CacheConfig) -> int:
204
"""
205
Calculate the amount of memory required by vLLM, then validate