[Feature] Xiaomi MiMo-V2-Flash day0 support (#15207)
Co-authored-by: 谢学扬 <xiexueyang@xiaomi.com> Co-authored-by: tz <tangzhen3@xiaomi.com> Co-authored-by: 李家乐 <lijiale10@xiaomi.com> Co-authored-by: 张晨 <zhangchen50@xiaomi.com> Co-authored-by: Shaohui Liu <liushaohui3@xiaomi.com> Co-authored-by: 王晨 <wangchen77@xiaomi.com> Co-authored-by: jiangzihan <jiangzihan@xiaomi.com> Co-authored-by: xiexueyang <xyxie_wangyi@163.com> Co-authored-by: Linghao Zhang <zhanglinghao@xiaomi.com> Co-authored-by: ispobock <ispobaoke@gmail.com> Co-authored-by: Liangsheng Yin <lsyincs@gmail.com> Co-authored-by: JoyFuture <35593546+JoyFuture@users.noreply.github.com> Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com> Co-authored-by: Qiaolin Yu <liin1211@outlook.com> Co-authored-by: root <root@bj9-ml-g8h20e-k8s-slave106-20251106.alicn.idc.xiaomi.com>
This commit is contained in:
co-authored by
谢学扬
tz
李家乐
张晨
Shaohui Liu
王晨
jiangzihan
xiexueyang
Linghao Zhang
ispobock
Liangsheng Yin
JoyFuture
Liangsheng Yin
Qiaolin Yu
root
parent
a0985dd5e5
commit
160a06cab2
@@ -438,6 +438,10 @@ class ServerArgs:
|
||||
speculative_ngram_branch_length: int = 18
|
||||
speculative_ngram_capacity: int = 10 * 1000 * 1000
|
||||
|
||||
# For Multi-Layer MTP
|
||||
# FIXME: rename -> enable_multi_layer_mtp
|
||||
enable_mtp: bool = False
|
||||
|
||||
# Expert parallelism
|
||||
ep_size: int = 1
|
||||
moe_a2a_backend: Literal["none", "deepep", "mooncake", "ascend_fuseep"] = "none"
|
||||
@@ -1175,6 +1179,16 @@ class ServerArgs:
|
||||
), "Triton kernel MoE is only supported when ep_size == 1"
|
||||
self.disable_hybrid_swa_memory = True
|
||||
|
||||
elif "MiMoV2FlashForCausalLM" in model_arch:
|
||||
self.swa_full_tokens_ratio = 1.0
|
||||
logger.warning(
|
||||
"Reset swa_full_tokens_ratio to 1.0 for MiMoV2FlashForCausalLM model"
|
||||
)
|
||||
if self.enable_hierarchical_cache:
|
||||
self.disable_hybrid_swa_memory = True
|
||||
logger.warning(
|
||||
"Disable hybrid SWA memory for MiMoV2FlashForCausalLM model with hierarchical cache"
|
||||
)
|
||||
elif "Llama4" in model_arch and self.device != "cpu":
|
||||
# Auto-select attention backend for Llama4 if not specified
|
||||
if self.attention_backend is None:
|
||||
@@ -3405,6 +3419,13 @@ class ServerArgs:
|
||||
help="The cache capacity for ngram speculative decoding.",
|
||||
)
|
||||
|
||||
# Speculative decoding (MTP)
|
||||
parser.add_argument(
|
||||
"--enable-mtp",
|
||||
action="store_true",
|
||||
help="Enable multi-layer MTP speculative decoding.",
|
||||
)
|
||||
|
||||
# Expert parallelism
|
||||
parser.add_argument(
|
||||
"--expert-parallel-size",
|
||||
|
||||
Reference in New Issue
Block a user