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,36 @@
# SPDX-License-Identifier: Apache-2.0
from types import SimpleNamespace
from vllm_ascend.patch.worker.patch_deepseek_v2 import _should_skip_indexer_init
def _config(**overrides) -> SimpleNamespace:
values = {"num_hidden_layers": 80}
values.update(overrides)
return SimpleNamespace(**values)
def test_glm51_skip_topk_keeps_per_layer_indexer():
assert not _should_skip_indexer_init(
_config(),
"model.layers.2.self_attn",
skip_topk=True,
)
def test_glm52_shared_layer_skips_indexer_init():
assert _should_skip_indexer_init(
_config(indexer_types=["full", "full", "shared"]),
"model.layers.2.self_attn",
skip_topk=True,
)
def test_mtp_layer_keeps_indexer():
indexer_types = ["full"] * 80 + ["shared"]
assert not _should_skip_indexer_init(
_config(indexer_types=indexer_types),
"model.layers.80.self_attn",
skip_topk=True,
)