[Deprecation] Deprecate items scheduled for 0.29 (#55353)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -7,12 +7,9 @@ from typing import Any, Literal
|
||||
from pydantic import field_validator
|
||||
|
||||
from vllm.config.utils import config
|
||||
from vllm.logger import init_logger
|
||||
from vllm.v1.attention.backends.mla.prefill.registry import MLAPrefillBackendEnum
|
||||
from vllm.v1.attention.backends.registry import AttentionBackendEnum
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
IndexerKVDType = Literal["auto", "bf16", "fp8", "mxfp4", "nvfp4"]
|
||||
MiniMaxM3MSADecodeBackend = Literal["triton", "cutlass"]
|
||||
|
||||
@@ -64,10 +61,6 @@ class AttentionConfig:
|
||||
use_prefill_query_quantization: bool = False
|
||||
"""If set, quantize query for attention in prefill."""
|
||||
|
||||
use_fp4_indexer_cache: bool | None = None
|
||||
"""Deprecated alias for `indexer_kv_dtype`; use that instead. True maps to
|
||||
`mxfp4`, False is a no-op (it selected the model default already)."""
|
||||
|
||||
indexer_kv_dtype: IndexerKVDType = "auto"
|
||||
"""Data type for the sparse-attention indexer K cache. "auto" picks the
|
||||
model's default (bf16 for MiniMax M3, fp8 for the DeepSeek sparse
|
||||
@@ -116,20 +109,6 @@ class AttentionConfig:
|
||||
# layers still use the platform's normal automatic backend.
|
||||
self.backend = None
|
||||
|
||||
if self.use_fp4_indexer_cache is not None:
|
||||
logger.warning(
|
||||
"use_fp4_indexer_cache is deprecated and will be removed in "
|
||||
"v0.29. Use indexer_kv_dtype instead (True -> 'mxfp4')."
|
||||
)
|
||||
if self.use_fp4_indexer_cache:
|
||||
if self.indexer_kv_dtype not in ("auto", "mxfp4"):
|
||||
raise ValueError(
|
||||
"use_fp4_indexer_cache=True conflicts with "
|
||||
f"indexer_kv_dtype={self.indexer_kv_dtype!r}. Set only "
|
||||
"indexer_kv_dtype."
|
||||
)
|
||||
self.indexer_kv_dtype = "mxfp4"
|
||||
|
||||
def resolve_indexer_kv_dtype(self, default: IndexerKVDType) -> IndexerKVDType:
|
||||
"""Resolve `indexer_kv_dtype`, substituting `default` for "auto"."""
|
||||
if self.indexer_kv_dtype == "auto":
|
||||
@@ -146,9 +125,7 @@ class AttentionConfig:
|
||||
"""
|
||||
from vllm.config.utils import get_hash_factors, hash_factors
|
||||
|
||||
# Folded into indexer_kv_dtype by __post_init__.
|
||||
ignored_factors: set[str] = {"use_fp4_indexer_cache"}
|
||||
factors = get_hash_factors(self, ignored_factors)
|
||||
factors = get_hash_factors(self, set())
|
||||
return hash_factors(factors)
|
||||
|
||||
@field_validator("backend", mode="before")
|
||||
|
||||
+2
-13
@@ -8,7 +8,7 @@ from typing import Any, ClassVar, Literal
|
||||
|
||||
from pydantic import Field, field_validator, model_validator
|
||||
|
||||
from vllm.config.utils import config, get_from_deprecated_env_if_set
|
||||
from vllm.config.utils import config
|
||||
from vllm.logger import init_logger
|
||||
from vllm.utils.torch_utils import (
|
||||
is_quantized_kv_cache,
|
||||
@@ -58,15 +58,6 @@ CacheDType = Literal[
|
||||
]
|
||||
|
||||
|
||||
def _get_prefix_cache_retention_interval() -> int | None:
|
||||
env_value = get_from_deprecated_env_if_set(
|
||||
"VLLM_PREFIX_CACHE_RETENTION_INTERVAL",
|
||||
"v0.29",
|
||||
"prefix_cache_retention_interval",
|
||||
)
|
||||
return 0 if env_value is None else int(env_value)
|
||||
|
||||
|
||||
MambaDType = Literal["auto", "float32", "float16", "bfloat16"]
|
||||
MambaCacheMode = Literal["all", "align", "none"]
|
||||
PrefixCachingHashAlgo = Literal["sha256", "sha256_cbor", "xxhash", "xxhash_cbor"]
|
||||
@@ -154,9 +145,7 @@ class CacheConfig:
|
||||
security risk tolerance against the performance benefits before turning this on.
|
||||
- "xxhash_cbor" combines canonical CBOR serialization with xxHash for
|
||||
reproducible hashing. Requires the optional ``xxhash`` package."""
|
||||
prefix_cache_retention_interval: int | None = Field(
|
||||
default_factory=_get_prefix_cache_retention_interval, ge=0
|
||||
)
|
||||
prefix_cache_retention_interval: int | None = Field(default=0, ge=0)
|
||||
"""Token interval between retained sliding-window and Mamba prefix-cache
|
||||
checkpoints. ``0`` retains only semantic checkpoints, including the latest
|
||||
replay boundary and shared-prefix junctions. Positive values additionally
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from collections.abc import Mapping
|
||||
from pathlib import Path
|
||||
from typing import Any, Literal, TypeAlias, TypedDict, cast, final
|
||||
from typing import Any, Literal, TypeAlias, TypedDict, final
|
||||
|
||||
import torch
|
||||
from pydantic import ConfigDict, Field, field_validator, model_validator
|
||||
@@ -11,7 +11,7 @@ from pydantic.dataclasses import dataclass
|
||||
|
||||
import vllm.envs as envs
|
||||
from vllm.config.ec_transfer import ECTransferConfig
|
||||
from vllm.config.utils import config, get_from_deprecated_env_if_set
|
||||
from vllm.config.utils import config
|
||||
from vllm.logger import init_logger
|
||||
from vllm.utils.hashing import safe_hash
|
||||
from vllm.v1.attention.backends.registry import AttentionBackendEnum
|
||||
@@ -75,16 +75,6 @@ MMProcessorDevice: TypeAlias = str
|
||||
`"xpu"` on XPU). Validated against that set by the CLI."""
|
||||
|
||||
|
||||
def _get_mm_hasher_algorithm() -> MMHasherAlgorithm:
|
||||
env_value = get_from_deprecated_env_if_set(
|
||||
"VLLM_MM_HASHER_ALGORITHM",
|
||||
"v0.27",
|
||||
"mm_hasher_algorithm",
|
||||
)
|
||||
env_value = "blake3" if env_value is None else env_value
|
||||
return cast(MMHasherAlgorithm, env_value.lower())
|
||||
|
||||
|
||||
MMDummyOptions: TypeAlias = dict[str, BaseDummyOptions]
|
||||
"""
|
||||
A dictionary containing an entry for each modality type of dummy data.
|
||||
@@ -164,9 +154,7 @@ class MultiModalConfig:
|
||||
mm_processor_cache_type: MMCacheType = "lru"
|
||||
"""Type of cache to use for the multi-modal preprocessor/mapper. If `shm`,
|
||||
use shared memory FIFO cache. If `lru`, use mirrored LRU cache."""
|
||||
mm_hasher_algorithm: MMHasherAlgorithm = Field(
|
||||
default_factory=_get_mm_hasher_algorithm
|
||||
)
|
||||
mm_hasher_algorithm: MMHasherAlgorithm = "blake3"
|
||||
"""Hash algorithm to use for multi-modal input caching. Use `"sha256"` or
|
||||
`"sha512"` for FIPS-compliant deployments."""
|
||||
mm_shm_cache_max_object_size_mb: int = Field(default=128, ge=0)
|
||||
|
||||
Reference in New Issue
Block a user