Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/srt/models/test_nvidia_nemotron_nano_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class TestNvidiaNemotronNanoV2NVFP4(GSM8KMixin, CustomTestCase):
other_args = ["--max-mamba-cache-size", "256"]


@unittest.skip(
"STANDALONE speculative decoding does not yet support target and draft models "
"with different hidden sizes (Nemotron-9B: 4480, Llama-3.2-1B: 2048)"
)
Comment on lines +27 to +30
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The skip reason message is duplicated for the TestNvidiaNemotronNanoV2SpeculativeDecodingBF16Cache test class on line 56. To improve maintainability and follow the DRY (Don't Repeat Yourself) principle, it would be better to define this string as a module-level constant and reuse it in both @unittest.skip decorators.

For example, you could define the following constant at the top of the file:

_STANDALONE_SPEC_DECODING_SKIP_REASON = (
    "STANDALONE speculative decoding does not yet support target and draft models "
    "with different hidden sizes (Nemotron-9B: 4480, Llama-3.2-1B: 2048)"
)

Then, you can use it like this:

@unittest.skip(_STANDALONE_SPEC_DECODING_SKIP_REASON)
class TestNvidiaNemotronNanoV2SpeculativeDecoding(GSM8KMixin, CustomTestCase):
    # ...

@unittest.skip(_STANDALONE_SPEC_DECODING_SKIP_REASON)
class TestNvidiaNemotronNanoV2SpeculativeDecodingBF16Cache(GSM8KMixin, CustomTestCase):
    # ...

class TestNvidiaNemotronNanoV2SpeculativeDecoding(GSM8KMixin, CustomTestCase):
accuracy = 0.87
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2"
Expand All @@ -49,6 +53,10 @@ class TestNvidiaNemotronNanoV2SpeculativeDecoding(GSM8KMixin, CustomTestCase):
]


@unittest.skip(
"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):
accuracy = 0.87
model = "nvidia/NVIDIA-Nemotron-Nano-9B-v2"
Expand Down
Loading