diff --git a/tests/test_config.py b/tests/test_config.py index bd6b312094..39798acb05 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1588,14 +1588,14 @@ def test_engram_dp_shared_memory_config_validation( ("DeepseekV41ForCausalLM", [1], "cuda", True), ("DeepseekV41ForCausalLM", [1], "rocm", True), ("DeepseekV41ForCausalLM", [], "cuda", False), - ("DeepseekV41ForCausalLM", [1], "cpu", False), + ("DeepseekV41ForCausalLM", [1], "cpu", True), ("Qwen4ExpForCausalLM", [1], "cuda", True), ("Qwen4ExpForCausalLM", [1], "rocm", True), ("Qwen4ExpForConditionalGeneration", [1], "cuda", True), ("Qwen4ExpForConditionalGeneration", [1], "rocm", True), ("Qwen4ExpForCausalLM", [], "cuda", False), ("Qwen4ExpForCausalLM", None, "cuda", False), - ("Qwen4ExpForCausalLM", [1], "cpu", False), + ("Qwen4ExpForCausalLM", [1], "cpu", True), ("LlamaForCausalLM", [1], "cuda", False), ("Qwen4ExpMTP", [], "cuda", False), (None, None, "cuda", False), diff --git a/vllm/config/engram.py b/vllm/config/engram.py index 2539475296..fd95bc2acd 100644 --- a/vllm/config/engram.py +++ b/vllm/config/engram.py @@ -67,8 +67,6 @@ class EngramConfig: def verify_model_config(self, model_config: "ModelConfig | None") -> None: """Reject Engram configuration for models without n-gram embeddings.""" - from vllm.platforms import current_platform - field = ( _NGRAM_LAYER_FIELDS.get(model_config.architecture) if model_config is not None @@ -77,13 +75,11 @@ class EngramConfig: if ( model_config is None or field is None - or not current_platform.is_cuda_alike() or not getattr(model_config.hf_text_config, field, None) ): raise ValueError( "EngramConfig requires a model with supported Engram " - "embeddings, non-empty n-gram layer ids, and a CUDA-alike " - "device (CUDA or ROCm)." + "embeddings and non-empty n-gram layer ids." ) def resolve_dp_shared_memory(self, parallel_config: "ParallelConfig") -> None: diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 8022cd0b88..28764e1fcc 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -1370,8 +1370,6 @@ class VllmConfig: def _resolve_and_verify_engram_config(self) -> None: """Resolve defaults and validate n-gram embedding settings.""" - from vllm.platforms import current_platform - model_config = self.model_config speculative_config = self.speculative_config # Draft configs inherit the target's communication groups and settings. @@ -1392,9 +1390,7 @@ class VllmConfig: "Disable --enable-dbo and set --ubatch-size to 0." ) if self.engram_config is None: - if not current_platform.is_cuda_alike() or not model_has_engram_layers( - model_config - ): + if not model_has_engram_layers(model_config): return self.engram_config = EngramConfig() self.engram_config.verify_model_config(model_config)