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 3, 15:15 UTC
[Bugfix] Clarify CPU backend memory error messages reference shared flag (#42479)
Signed-off-by: daniel-devlab <282598346+daniel-devlab@users.noreply.github.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
Daniel W committed
May 15, 2026 at 02:35 UTC
27b85d2084c48f9b12f8cfd6638a56fe9b257635
2 files changed
+11
-5
vllm/v1/core/kv_cache_utils.py
+6
-3
@@ -697,7 +697,9 @@ def _check_enough_kv_cache_memory(
697
if available_memory <= 0:
698
raise ValueError(
699
"No available memory for the cache blocks. "
700
- "Try increasing `gpu_memory_utilization` when initializing the engine. "
700
+ "Try increasing `gpu_memory_utilization` when initializing the engine "
701
+ "(this flag also controls CPU memory reservation on the CPU "
702
+ "backend, despite its name). "
703
"See https://docs.vllm.ai/en/latest/configuration/conserving_memory/ "
704
"for more details."
705
)
@@ -714,11 +716,12 @@ def _check_enough_kv_cache_memory(
716
)
717
718
raise ValueError(
717
- f"To serve at least one request with the models's max seq len "
719
+ f"To serve at least one request with the model's max seq len "
720
f"({max_model_len}), ({format_gib(needed_memory)} GiB KV "
721
f"cache is needed, which is larger than the available KV cache "
722
f"memory ({format_gib(available_memory)} GiB). {estimated_msg}"
721
- f"Try increasing `gpu_memory_utilization` or decreasing `max_model_len` "
723
+ f"Try increasing `gpu_memory_utilization` (which also controls "
724
+ f"CPU memory on the CPU backend) or decreasing `max_model_len` "
725
f"when initializing the engine. "
726
f"See https://docs.vllm.ai/en/latest/configuration/conserving_memory/ "
727
f"for more details."
vllm/v1/worker/cpu_worker.py
+5
-2
@@ -71,8 +71,11 @@ class CPUWorker(Worker):
71
f"is less than desired CPU memory utilization "
72
f"({vllm_config.cache_config.gpu_memory_utilization}, "
73
f"{format_gib(self.requested_cpu_memory)} GiB). "
74
- "Decrease --gpu-memory-utilization"
75
- f" or reduce CPU memory used by other processes."
74
+ "On the CPU backend, the `--gpu-memory-utilization` flag "
75
+ "controls the fraction of CPU memory reserved (despite its "
76
+ "name). To resolve: decrease `--gpu-memory-utilization` "
77
+ "(e.g. `--gpu-memory-utilization 0.5`) "
78
+ "or reduce CPU memory used by other processes."
79
)
80
81
super().__init__(