init v0.23.0

Signed-off-by: Sun Ruoxi <sunruoxi@4paradigm.com>
This commit is contained in:
2026-08-27 15:11:51 +08:00
parent b582a8e7d1
commit 7f8a1b1f7a
2849 changed files with 712887 additions and 22001 deletions

View File

@@ -0,0 +1,23 @@
from types import SimpleNamespace
from vllm_ascend.quantization.methods.base import get_moe_num_logical_experts
def test_get_moe_num_logical_experts_uses_vllm_config_field():
layer = SimpleNamespace(moe_config=SimpleNamespace(num_logical_experts=128))
assert get_moe_num_logical_experts(layer, num_experts=130, global_redundant_expert_num=2) == 128
def test_get_moe_num_logical_experts_falls_back_for_older_configs():
layer = SimpleNamespace(moe_config=SimpleNamespace())
assert (
get_moe_num_logical_experts(
layer,
num_experts=133,
global_redundant_expert_num=2,
num_shared_experts=3,
)
== 128
)