[Engram] Drop redundant VLLM_PLE_CPU_OFFLOAD env var (#57937)

Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>

Nicolò Lucchesi committed Sep 21, 2026 at 20:16 UTC 54020c3c3ec9de219929a5a956010a0251b87520
3 files changed +5 -23
tests/test_config.py
+2 -10
@@ -1392,16 +1392,8 @@ def test_engram_model_support(
1392 assert resolved.engram_config.cpu_offload is True
1393
1394
1395 -@pytest.mark.parametrize(
1396 - ("value", "expected"), [(None, True), ("0", False), ("1", True)]
1397 -)
1398 -def test_engram_cpu_offload_environment_default(monkeypatch, value, expected):
1399 - monkeypatch.delenv("VLLM_PLE_CPU_OFFLOAD", raising=False)
1400 - if value is not None:
1401 - monkeypatch.setenv("VLLM_PLE_CPU_OFFLOAD", value)
1402 - assert EngramConfig().cpu_offload is expected
1403 - assert EngramConfig(cpu_offload=False).cpu_offload is False
1404 - assert EngramConfig(cpu_offload=True).cpu_offload is True
1395 +def test_engram_cpu_offload_default():
1396 + assert EngramConfig().cpu_offload is True
1397
1398
1399 def test_engram_config_defaults_to_none():
vllm/config/engram.py
+3 -10
@@ -3,10 +3,9 @@
3
4 from typing import TYPE_CHECKING
5
6 -from pydantic import Field, model_validator
6 +from pydantic import model_validator
7 from typing_extensions import Self
8
9 -import vllm.envs as envs
9 from vllm.config.utils import config, get_hash_factors, hash_factors
10
11 if TYPE_CHECKING:
@@ -22,10 +21,6 @@ _NGRAM_LAYER_FIELDS = {
21 }
22
23
25 -def _default_cpu_offload() -> bool:
26 - return envs.VLLM_PLE_CPU_OFFLOAD
27 -
28 -
24 def model_has_engram_layers(model_config: "ModelConfig | None") -> bool:
25 """Whether the model carries n-gram embedding layers."""
26 if model_config is None:
@@ -40,10 +35,8 @@ def model_has_engram_layers(model_config: "ModelConfig | None") -> bool:
35 class EngramConfig:
36 """Configuration for Engram embedding storage and sharding."""
37
43 - cpu_offload: bool = Field(default_factory=_default_cpu_offload)
44 - """Store embedding weights in pinned CPU memory for UVA lookup.
45 - Defaults to VLLM_PLE_CPU_OFFLOAD, which is enabled by default. An explicit
46 - value takes precedence over the environment variable."""
38 + cpu_offload: bool = True
39 + """Store embedding weights in pinned CPU memory for UVA lookup."""
40
41 embedding_across_dp: bool = False
42 """Shard embeddings across TP and all DP ranks when enabled.
vllm/envs.py
-3
@@ -156,7 +156,6 @@ if TYPE_CHECKING:
156 VLLM_ROCM_SHUFFLE_KV_CACHE_LAYOUT: bool = False
157 VLLM_ENABLE_V1_MULTIPROCESSING: bool = True
158 VLLM_LOG_BATCHSIZE_INTERVAL: float = -1
159 - VLLM_PLE_CPU_OFFLOAD: bool = True
159 VLLM_DISABLE_COMPILE_CACHE: bool = False
160 VLLM_REPLICATE_EMBED: bool = False
161 VLLM_USE_LAYERNAME: bool = True
@@ -2066,8 +2065,6 @@ environment_variables: dict[str, Callable[[], Any]] = {
2065 "VLLM_LOG_MODEL_INSPECTION": lambda: bool(
2066 int(os.getenv("VLLM_LOG_MODEL_INSPECTION", "0"))
2067 ),
2069 - # Store n-gram embedding tables in pinned CPU memory for UVA lookup.
2070 - "VLLM_PLE_CPU_OFFLOAD": lambda: bool(int(os.getenv("VLLM_PLE_CPU_OFFLOAD", "1"))),
2068 # Debug logging for --enable-mfu-metrics
2069 "VLLM_DEBUG_MFU_METRICS": lambda: bool(
2070 int(os.getenv("VLLM_DEBUG_MFU_METRICS", "0"))