[Bugfix] Declare SupportsEagle3 on KimiLinearForCausalLM (#52171)
Signed-off-by: Nick Iusiumbeli <nickuspro@gmail.com>
This commit is contained in:
@@ -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 import model as kimi_model
|
||||||
from vllm.models.kimi_k3.nvidia.model import (
|
from vllm.models.kimi_k3.nvidia.model import (
|
||||||
KimiK3ForConditionalGeneration,
|
KimiK3ForConditionalGeneration,
|
||||||
|
KimiLinearForCausalLM,
|
||||||
KimiLinearModel,
|
KimiLinearModel,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -25,6 +26,14 @@ def test_kimi_k3_advertises_eagle3_support():
|
|||||||
assert supports_eagle3(KimiK3ForConditionalGeneration)
|
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():
|
def test_kimi_k3_uses_shared_eagle3_layer_configuration():
|
||||||
target = object.__new__(KimiK3ForConditionalGeneration)
|
target = object.__new__(KimiK3ForConditionalGeneration)
|
||||||
torch.nn.Module.__init__(target)
|
torch.nn.Module.__init__(target)
|
||||||
|
|||||||
@@ -1477,7 +1477,7 @@ class KimiLinearModel(nn.Module, EagleModelMixin, SupportsQuant):
|
|||||||
|
|
||||||
|
|
||||||
class KimiLinearForCausalLM(
|
class KimiLinearForCausalLM(
|
||||||
nn.Module, HasInnerState, SupportsPP, MixtureOfExperts, IsHybrid
|
nn.Module, HasInnerState, SupportsPP, MixtureOfExperts, IsHybrid, SupportsEagle3
|
||||||
):
|
):
|
||||||
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|||||||
Reference in New Issue
Block a user