Support LingV2_5 model (#18598)
Co-authored-by: zhangkaihong.zkh <zhangkaihong.zkh@antgroup.com> Co-authored-by: 有禾 <zhangdonghao.zdh@antgroup.com> Co-authored-by: yudian0504 <138860534+yudian0504@users.noreply.github.com> Co-authored-by: 悠扬 <youyang.zmy@antgroup.com> Co-authored-by: xinxingyang <xinxing.yangxx@antgroup.com> Co-authored-by: zmy460290 <zmy460290@antgroup.com>
This commit is contained in:
co-authored by
zhangkaihong.zkh
有禾
yudian0504
悠扬
xinxingyang
zmy460290
parent
013a199bc6
commit
d97eb111a3
@@ -31,6 +31,7 @@ import torch.distributed as dist
|
||||
from torch import nn
|
||||
|
||||
from sglang.srt.configs import (
|
||||
BailingHybridConfig,
|
||||
FalconH1Config,
|
||||
JetNemotronConfig,
|
||||
JetVLMConfig,
|
||||
@@ -1549,6 +1550,13 @@ class ModelRunner(ModelRunnerKVCacheMixin):
|
||||
return config
|
||||
return None
|
||||
|
||||
@property
|
||||
def hybrid_lightning_config(self):
|
||||
config = self.model_config.hf_config
|
||||
if isinstance(config, BailingHybridConfig):
|
||||
return config
|
||||
return None
|
||||
|
||||
@property
|
||||
def hybrid_gdn_config(self):
|
||||
config = self.model_config.hf_config.get_text_config()
|
||||
@@ -1597,7 +1605,12 @@ class ModelRunner(ModelRunnerKVCacheMixin):
|
||||
|
||||
@property
|
||||
def mambaish_config(self):
|
||||
return self.mamba2_config or self.hybrid_gdn_config or self.kimi_linear_config
|
||||
return (
|
||||
self.mamba2_config
|
||||
or self.hybrid_gdn_config
|
||||
or self.kimi_linear_config
|
||||
or self.hybrid_lightning_config
|
||||
)
|
||||
|
||||
def can_run_piecewise_cuda_graph(self):
|
||||
if self.is_draft_worker:
|
||||
|
||||
@@ -584,7 +584,13 @@ class ModelRunnerKVCacheMixin:
|
||||
head_dim=self.model_config.head_dim,
|
||||
# if draft worker, we only need 1 attention layer's kv pool
|
||||
full_attention_layer_ids=(
|
||||
[0] if self.is_draft_worker else config.full_attention_layer_ids
|
||||
[0]
|
||||
if self.is_draft_worker
|
||||
else [
|
||||
i
|
||||
for i in config.full_attention_layer_ids
|
||||
if self.start_layer <= i < self.end_layer
|
||||
]
|
||||
),
|
||||
enable_kvcache_transpose=False,
|
||||
device=self.device,
|
||||
|
||||
Reference in New Issue
Block a user