Skip to content

Conversation

Fridge003
Copy link
Collaborator

Motivation

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

Copy link
Contributor

Summary of Changes

Hello @Fridge003, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new Continuous Integration (CI) test for the DeepSeek V3.2 MTP (Multi-Turn Prediction) model. The primary goal is to establish automated validation for this model, specifically focusing on its performance and accuracy when utilizing advanced speculative decoding techniques like the EAGLE algorithm. This ensures that future changes do not negatively impact the model's behavior under these optimized configurations, thereby maintaining the reliability and efficiency of the DeepSeek V3.2 MTP integration.

Highlights

  • New CI Test for DeepSeek V3.2 MTP: A dedicated CI test test_deepseek_v32_mtp.py has been added to validate the DeepSeek V3.2 MTP model's performance and accuracy.
  • Integration into Test Suite: The new MTP test is now included in the per-commit-8-gpu-h200-deepseek-v32 test suite within run_suite.py.
  • Speculative Decoding Configuration: The new test sets up the DeepSeek V3.2 model with specific speculative decoding parameters, including the EAGLE algorithm, 8-way tensor parallelism, and 8-way data parallelism.
  • Accuracy and Speed Benchmarking: The MTP test includes checks for GSM8k accuracy (asserting >0.935) and single-batch inference speed (asserting >75 tokens/s), along with average speculative accept length (asserting >2.9).
  • Consistency Updates: The existing test_deepseek_v32_basic.py file has been updated to correctly reference "DeepSeek V3.2" in its class name and CI summary outputs.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new CI test for DeepSeek V3.2 with MTP. The changes include adding the new test file test_deepseek_v32_mtp.py, updating run_suite.py to include it in the CI, and fixing some typos in the existing test_deepseek_v32_basic.py.

The implementation is straightforward, but the new test file introduces significant code duplication with test_deepseek_v32_basic.py. My review includes suggestions to refactor the duplicated code to improve maintainability, such as using a shared constant for the model path and creating a base test class for common logic. These changes will make the test suite cleaner and easier to manage in the future.

Comment on lines +18 to +24
FULL_DEEPSEEK_V3_MODEL_PATH = "deepseek-ai/DeepSeek-V3.2-Exp"


class TestDeepseekV32MTP(CustomTestCase):
@classmethod
def setUpClass(cls):
cls.model = FULL_DEEPSEEK_V3_MODEL_PATH
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The constant FULL_DEEPSEEK_V3_MODEL_PATH has the same value as DEEPSEEK_V32_MODEL_PATH in test_deepseek_v32_basic.py. To maintain consistency and avoid confusion, it's better to use the same name. The FULL_ prefix is also redundant.

Ideally, this constant should be defined once in a shared location and imported where needed to adhere to the DRY (Don't Repeat Yourself) principle.

Suggested change
FULL_DEEPSEEK_V3_MODEL_PATH = "deepseek-ai/DeepSeek-V3.2-Exp"
class TestDeepseekV32MTP(CustomTestCase):
@classmethod
def setUpClass(cls):
cls.model = FULL_DEEPSEEK_V3_MODEL_PATH
DEEPSEEK_V32_MODEL_PATH = "deepseek-ai/DeepSeek-V3.2-Exp"
class TestDeepseekV32MTP(CustomTestCase):
@classmethod
def setUpClass(cls):
cls.model = DEEPSEEK_V32_MODEL_PATH

FULL_DEEPSEEK_V3_MODEL_PATH = "deepseek-ai/DeepSeek-V3.2-Exp"


class TestDeepseekV32MTP(CustomTestCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This test class shares a lot of duplicate code with TestDeepseekV32Basic in test/srt/test_deepseek_v32_basic.py. For example, the tearDownClass method and large parts of the test methods (test_a_gsm8k, test_bs_1_speed) are identical or very similar.

To improve maintainability and follow the DRY (Don't Repeat Yourself) principle, consider refactoring the common code into a base test class. The subclasses (TestDeepseekV32Basic and TestDeepseekV32MTP) would then only need to define their specific configurations (e.g., other_args in setUpClass) and any specific assertions.

A possible structure could be:

# In a shared location, e.g., a new base test file
class TestDeepseekV32Base(CustomTestCase):
    model = "deepseek-ai/DeepSeek-V3.2-Exp"
    base_url = DEFAULT_URL_FOR_TEST
    process = None
    other_args = []

    @classmethod
    def setUpClass(cls):
        cls.process = popen_launch_server(
            cls.model,
            cls.base_url,
            timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
            other_args=cls.other_args,
        )

    @classmethod
    def tearDownClass(cls):
        if cls.process:
            kill_process_tree(cls.process.pid)

    # ... common test logic can be extracted into helper methods ...

This would make the tests cleaner and easier to maintain in the long run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants