[NPU] enhance accuracy for model kimi-vl-a3b-instruct (#17480)
Co-authored-by: cy <chenyang08056032@163.com>
This commit is contained in:
@@ -103,6 +103,10 @@ def forward_mha_prepare_npu(
|
||||
k_pe = latent_cache[:, :, m.kv_lora_rank :]
|
||||
if m.rotary_emb is not None:
|
||||
q_pe, k_pe = m.rotary_emb(positions, q_pe, k_pe)
|
||||
# this is for model kimi-vl-a3B-instruct
|
||||
forward_batch.token_to_kv_pool.set_kv_buffer(
|
||||
m, forward_batch.out_cache_loc, kv_a.unsqueeze(1), k_pe
|
||||
)
|
||||
|
||||
q[..., m.qk_nope_head_dim :] = q_pe
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.gsm8k_ascend_mixin import GSM8KAscendMixin
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
|
||||
register_npu_ci(est_time=400, suite="nightly-4-npu-a3", nightly=True)
|
||||
|
||||
|
||||
class TestKimiVLA3BInstruct(GSM8KAscendMixin, CustomTestCase):
|
||||
model = "/root/.cache/modelscope/hub/models/Kimi/Kimi-VL-A3B-Instruct"
|
||||
accuracy = 0.66
|
||||
other_args = [
|
||||
"--trust-remote-code",
|
||||
"--max-running-requests",
|
||||
2048,
|
||||
"--mem-fraction-static",
|
||||
0.7,
|
||||
"--attention-backend",
|
||||
"ascend",
|
||||
"--tp-size",
|
||||
"4",
|
||||
"--disable-cuda-graph",
|
||||
]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user