[Fix] [Apple] mlx: Give the stub model a shared-expert layout (#45419)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: R0CKSTAR <yeahdongcn@gmail.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
R0CKSTAR
parent
f4035cab0b
commit
ed1f56fead
@@ -10,6 +10,7 @@ from typing import Tuple
|
||||
import torch
|
||||
|
||||
from sglang.srt.configs.hybrid_arch import mambaish_config
|
||||
from sglang.srt.configs.shared_experts import SharedExpertsConfig
|
||||
from sglang.srt.hardware_backend.mlx.kv_cache.auxiliary_state import (
|
||||
MlxAuxiliaryStateReqToTokenPool,
|
||||
)
|
||||
@@ -84,6 +85,10 @@ class _DummyModel:
|
||||
"""Minimal stand-in so that `inspect.signature(model.forward)` and
|
||||
`getattr(model, ...)` calls in ModelRunner.__init__ don't crash."""
|
||||
|
||||
# The model loader sets this on every Torch model, and the graph runners
|
||||
# read it during warmup. No Torch MoE layers exist here, so nothing is fused.
|
||||
shared_experts_config = SharedExpertsConfig()
|
||||
|
||||
@staticmethod
|
||||
def forward():
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user