[Bugfix] Declare SupportsEagle3 on KimiLinearForCausalLM (#52171)

Signed-off-by: Nick Iusiumbeli <nickuspro@gmail.com>
This commit is contained in:
Nick Iusiumbeli
2026-08-13 16:22:50 +00:00
committed by GitHub
parent b245d8e73f
commit 83d4c6196a
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -10,6 +10,7 @@ from vllm.model_executor.models.interfaces import supports_eagle3
from vllm.models.kimi_k3.nvidia import model as kimi_model
from vllm.models.kimi_k3.nvidia.model import (
KimiK3ForConditionalGeneration,
KimiLinearForCausalLM,
KimiLinearModel,
)
@@ -25,6 +26,14 @@ def test_kimi_k3_advertises_eagle3_support():
assert supports_eagle3(KimiK3ForConditionalGeneration)
def test_kimi_linear_advertises_eagle3_support():
# The text-only architecture serves the same inner KimiLinearModel, which
# already carries the EagleModelMixin tap machinery - only the interface
# declaration was missing, so EAGLE3-family speculative decoding (dspark)
# was rejected at startup with "Model does not support EAGLE3 interface".
assert supports_eagle3(KimiLinearForCausalLM)
def test_kimi_k3_uses_shared_eagle3_layer_configuration():
target = object.__new__(KimiK3ForConditionalGeneration)
torch.nn.Module.__init__(target)
+1 -1
View File
@@ -1477,7 +1477,7 @@ class KimiLinearModel(nn.Module, EagleModelMixin, SupportsQuant):
class KimiLinearForCausalLM(
nn.Module, HasInnerState, SupportsPP, MixtureOfExperts, IsHybrid
nn.Module, HasInnerState, SupportsPP, MixtureOfExperts, IsHybrid, SupportsEagle3
):
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__()