Skip to content

Commit 81c9904

Browse files
rahul-tuliclaude
andcommitted
fix: Add speculators Eagle detection as special case in V1 check
- Import is_speculators_eagle_config function - Add simple check for speculators Eagle models when method is not set - Minimal change that handles speculators format as a special case - Fixes issue where speculative_method was None causing V0 fallback Signed-off-by: rtuli@redhat.com 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Rahul Tuli <rtuli@redhat.com>
1 parent 4867831 commit 81c9904

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

vllm/engine/arg_utils.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from vllm.usage.usage_lib import UsageContext
4545
from vllm.utils import (STR_DUAL_CHUNK_FLASH_ATTN_VAL, FlexibleArgumentParser,
4646
GiB_bytes, get_ip, is_in_ray_actor)
47+
from vllm.transformers_utils.configs.speculators_eagle import is_speculators_eagle_config
4748

4849
# yapf: enable
4950

@@ -1468,6 +1469,8 @@ def _is_v1_supported_oracle(self, model_config: ModelConfig) -> bool:
14681469
if self.speculative_config is not None:
14691470
# This is supported but experimental (handled below).
14701471
speculative_method = self.speculative_config.get("method")
1472+
speculative_model = self.speculative_config.get("model")
1473+
14711474
if speculative_method:
14721475
if speculative_method in ("ngram", "[ngram]"):
14731476
is_ngram_enabled = True
@@ -1476,9 +1479,14 @@ def _is_v1_supported_oracle(self, model_config: ModelConfig) -> bool:
14761479
elif speculative_method in ("eagle", "eagle3", "deepseek_mtp"):
14771480
is_eagle_enabled = True
14781481
else:
1479-
speculative_model = self.speculative_config.get("model")
1480-
if speculative_model in ("ngram", "[ngram]"):
1481-
is_ngram_enabled = True
1482+
# If method is not set, try to detect from model
1483+
if speculative_model:
1484+
if speculative_model in ("ngram", "[ngram]"):
1485+
is_ngram_enabled = True
1486+
# Special case: Check if it's a speculators Eagle model
1487+
elif is_speculators_eagle_config(speculative_model):
1488+
is_eagle_enabled = True
1489+
14821490
if not (is_ngram_enabled or is_eagle_enabled or is_medusa_enabled):
14831491
# Other speculative decoding methods are not supported yet.
14841492
_raise_or_fallback(feature_name="Speculative Decoding",

0 commit comments

Comments
 (0)