Adapt fixture-kit to gsm8k mixin (#15599)
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.test.gsm8k_mixin import GSM8KMixin
|
||||
from sglang.test.mmmu_vlm_mixin import MMMUVLMMixin
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
from sglang.test.kits.gsm8k_accuracy_kit import GSM8KMixin
|
||||
from sglang.test.kits.mmmu_vlm_kit import MMMUVLMTestBase
|
||||
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
||||
|
||||
MODEL = "mistralai/Ministral-3-3B-Instruct-2512"
|
||||
|
||||
|
||||
class TestMinistral3TextOnly(GSM8KMixin, CustomTestCase):
|
||||
class TestMinistral3TextOnly(GSM8KMixin, DefaultServerBase):
|
||||
accuracy = 0.6
|
||||
model = MODEL
|
||||
other_args = ["--trust-remote-code"]
|
||||
|
||||
|
||||
class TestMinistral3MMMU(MMMUVLMMixin, CustomTestCase):
|
||||
class TestMinistral3MMMU(MMMUVLMTestBase):
|
||||
accuracy = 0.3
|
||||
model = MODEL
|
||||
other_args = ["--trust-remote-code"]
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import unittest
|
||||
|
||||
from sglang.srt.utils import is_blackwell
|
||||
from sglang.test.gsm8k_mixin import GSM8KMixin
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
from sglang.test.kits.gsm8k_accuracy_kit import GSM8KMixin
|
||||
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
||||
|
||||
|
||||
class TestNvidiaNemotronNanoV2BF16(GSM8KMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2BF16(GSM8KMixin, DefaultServerBase):
|
||||
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2"
|
||||
accuracy = 0.87
|
||||
other_args = ["--max-mamba-cache-size", "256"]
|
||||
|
||||
|
||||
class TestNvidiaNemotronNanoV2FP8(GSM8KMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2FP8(GSM8KMixin, DefaultServerBase):
|
||||
accuracy = 0.87
|
||||
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2-FP8"
|
||||
other_args = ["--max-mamba-cache-size", "256"]
|
||||
|
||||
|
||||
@unittest.skipIf(not is_blackwell(), "NVFP4 only supported on blackwell")
|
||||
class TestNvidiaNemotronNanoV2NVFP4(GSM8KMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2NVFP4(GSM8KMixin, DefaultServerBase):
|
||||
accuracy = 0.855
|
||||
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2-NVFP4"
|
||||
other_args = ["--max-mamba-cache-size", "256"]
|
||||
@@ -28,7 +28,7 @@ class TestNvidiaNemotronNanoV2NVFP4(GSM8KMixin, CustomTestCase):
|
||||
"STANDALONE speculative decoding does not yet support target and draft models "
|
||||
"with different hidden sizes (Nemotron-9B: 4480, Llama-3.2-1B: 2048)"
|
||||
)
|
||||
class TestNvidiaNemotronNanoV2SpeculativeDecoding(GSM8KMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2SpeculativeDecoding(GSM8KMixin, DefaultServerBase):
|
||||
accuracy = 0.87
|
||||
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2"
|
||||
other_args = [
|
||||
@@ -57,7 +57,9 @@ class TestNvidiaNemotronNanoV2SpeculativeDecoding(GSM8KMixin, CustomTestCase):
|
||||
"STANDALONE speculative decoding does not yet support target and draft models "
|
||||
"with different hidden sizes (Nemotron-9B: 4480, Llama-3.2-1B: 2048)"
|
||||
)
|
||||
class TestNvidiaNemotronNanoV2SpeculativeDecodingBF16Cache(GSM8KMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2SpeculativeDecodingBF16Cache(
|
||||
GSM8KMixin, DefaultServerBase
|
||||
):
|
||||
accuracy = 0.87
|
||||
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2"
|
||||
other_args = [
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.test.gsm8k_mixin import GSM8KMixin
|
||||
from sglang.test.mmmu_vlm_mixin import MMMUVLMMixin
|
||||
from sglang.test.test_utils import CustomTestCase
|
||||
from sglang.test.kits.gsm8k_accuracy_kit import GSM8KMixin
|
||||
from sglang.test.kits.mmmu_vlm_kit import MMMUVLMTestBase
|
||||
from sglang.test.server_fixtures.default_fixture import DefaultServerBase
|
||||
|
||||
MODEL = "nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16"
|
||||
|
||||
|
||||
class TestNvidiaNemotronNanoV2VLTextOnly(GSM8KMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2VLTextOnly(GSM8KMixin, DefaultServerBase):
|
||||
accuracy = 0.87
|
||||
model = MODEL
|
||||
other_args = ["--max-mamba-cache-size", "256", "--trust-remote-code"]
|
||||
|
||||
|
||||
class TestNvidiaNemotronNanoV2VLMMMU(MMMUVLMMixin, CustomTestCase):
|
||||
class TestNvidiaNemotronNanoV2VLMMMU(MMMUVLMTestBase):
|
||||
accuracy = 0.454
|
||||
model = MODEL
|
||||
other_args = ["--max-mamba-cache-size", "128", "--trust-remote-code"]
|
||||
|
||||
@@ -5,8 +5,8 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import is_hip
|
||||
from sglang.test.mmmu_vlm_mixin import DEFAULT_MEM_FRACTION_STATIC, MMMUVLMMixin
|
||||
from sglang.test.test_utils import CustomTestCase, is_in_ci
|
||||
from sglang.test.kits.mmmu_vlm_kit import DEFAULT_MEM_FRACTION_STATIC, MMMUVLMTestBase
|
||||
from sglang.test.test_utils import is_in_ci
|
||||
|
||||
_is_hip = is_hip()
|
||||
# VLM models for testing
|
||||
@@ -20,7 +20,7 @@ else:
|
||||
]
|
||||
|
||||
|
||||
class TestVLMModels(MMMUVLMMixin, CustomTestCase):
|
||||
class TestVLMModels(MMMUVLMTestBase):
|
||||
def test_vlm_mmmu_benchmark(self):
|
||||
"""Test VLM models against MMMU benchmark."""
|
||||
models_to_test = MODELS
|
||||
|
||||
Reference in New Issue
Block a user