[NPU] Add Gemma4 Sliding Window Attention support on Ascend backend (#26147)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.test_ascend_utils import GEMMA_4_26B_A4B_IT_WEIGHTS_PATH
|
||||
from sglang.test.ascend.vlm_utils import TestVLMModels
|
||||
|
||||
|
||||
class TestGemma426BA4BIt(TestVLMModels):
|
||||
"""Testcase: Verify that the inference accuracy of the google/gemma-4-26B-A4B-it model on the MMMU dataset is no less than 0.40.
|
||||
|
||||
[Test Category] Model
|
||||
[Test Target] google/gemma-4-26B-A4B-it
|
||||
"""
|
||||
|
||||
model = GEMMA_4_26B_A4B_IT_WEIGHTS_PATH
|
||||
mmmu_accuracy = 0.40
|
||||
|
||||
def test_vlm_mmmu_benchmark(self):
|
||||
self._run_vlm_mmmu_test()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.test_ascend_utils import GEMMA_4_31B_WEIGHTS_PATH
|
||||
from sglang.test.ascend.vlm_utils import TestVLMModels
|
||||
|
||||
|
||||
class TestGemma431B(TestVLMModels):
|
||||
"""Testcase: Verify that the inference accuracy of the google/gemma-4-31B-it model on the MMMU dataset is no less than 0.50.
|
||||
|
||||
[Test Category] Model
|
||||
[Test Target] google/gemma-4-31B-it
|
||||
"""
|
||||
|
||||
model = GEMMA_4_31B_WEIGHTS_PATH
|
||||
mmmu_accuracy = 0.50
|
||||
|
||||
def test_vlm_mmmu_benchmark(self):
|
||||
self._run_vlm_mmmu_test()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.test_ascend_utils import GEMMA_4_E2B_WEIGHTS_PATH
|
||||
from sglang.test.ascend.vlm_utils import TestVLMModels
|
||||
|
||||
|
||||
class TestGemma4E2B(TestVLMModels):
|
||||
"""Testcase: Verify that the inference accuracy of the google/gemma-4-E2B-it model on the MMMU dataset is no less than 0.15.
|
||||
|
||||
[Test Category] Model
|
||||
[Test Target] google/gemma-4-E2B-it
|
||||
"""
|
||||
|
||||
model = GEMMA_4_E2B_WEIGHTS_PATH
|
||||
mmmu_accuracy = 0.15
|
||||
|
||||
def test_vlm_mmmu_benchmark(self):
|
||||
self._run_vlm_mmmu_test()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.test_ascend_utils import GEMMA_4_E4B_WEIGHTS_PATH
|
||||
from sglang.test.ascend.vlm_utils import TestVLMModels
|
||||
|
||||
|
||||
class TestGemma4E4B(TestVLMModels):
|
||||
"""Testcase: Verify that the inference accuracy of the google/gemma-4-E4B-it model on the MMMU dataset is no less than 0.30.
|
||||
|
||||
[Test Category] Model
|
||||
[Test Target] google/gemma-4-E4B-it
|
||||
"""
|
||||
|
||||
model = GEMMA_4_E4B_WEIGHTS_PATH
|
||||
mmmu_accuracy = 0.30
|
||||
|
||||
def test_vlm_mmmu_benchmark(self):
|
||||
self._run_vlm_mmmu_test()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user