@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 79f2f1c2a1
Fork 0

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 15, 04:45 UTC

[CPU][CI] Fallback sliding window to v0 and fix CPU pooling model tests (#19901)

Signed-off-by: jiang1.li <jiang1.li@intel.com>

Li, Jiang committed Jun 20, 2025 at 23:30 UTC 79f2f1c2a1999d1e7a5202062bad4e115fd9d775
2 files changed +13 -1
tests/models/language/pooling/test_embedding.py
+6 -1
@@ -1,5 +1,7 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 +import os
4 +
5 import pytest
6
7 from vllm.config import PoolerConfig
@@ -33,7 +35,7 @@ def v1(run_with_both_engines):
35 # To avoid this problem, for now we skip v0 since it will be
36 # deprecated anyway.
37 pytest.param("ssmits/Qwen2-7B-Instruct-embed-base",
36 - marks=[pytest.mark.skip_v0]),
38 + marks=[pytest.mark.skip_v0, pytest.mark.cpu_model]),
39 # [Encoder-only]
40 pytest.param("BAAI/bge-base-en-v1.5",
41 marks=[
@@ -58,6 +60,9 @@ def test_models(
60 model,
61 monkeypatch,
62 ) -> None:
63 + if model == "intfloat/e5-mistral-7b-instruct" and current_platform.is_cpu(
64 + ) and os.environ.get("VLLM_USE_V1", "0") == "1":
65 + pytest.skip("CPU V1 doesn't support sliding window")
66
67 if model == "BAAI/bge-multilingual-gemma2" and current_platform.is_rocm():
68 # ROCm Triton FA does not currently support sliding window attention
vllm/engine/arg_utils.py
+7
@@ -1449,6 +1449,13 @@ class EngineArgs:
1449 model_config=model_config) and _warn_or_fallback(
1450 current_platform.device_name):
1451 return False
1452 +
1453 + if (current_platform.is_cpu()
1454 + and model_config.get_sliding_window() is not None):
1455 + _raise_or_fallback(feature_name="sliding window (CPU backend)",
1456 + recommend_to_remove=False)
1457 + return False
1458 +
1459 #############################################################
1460
1461 return True