Skip to content

[CI]Recitify Qwen3.8-27B spec decode E2E - #15567

Open
sunny-rain-63 wants to merge 10 commits into
vllm-project:mainfrom
sunny-rain-63:add_e2e_test
Open

[CI]Recitify Qwen3.8-27B spec decode E2E#15567
sunny-rain-63 wants to merge 10 commits into
vllm-project:mainfrom
sunny-rain-63:add_e2e_test

Conversation

@sunny-rain-63

@sunny-rain-63 sunny-rain-63 commented Sep 2, 2026

Copy link
Copy Markdown

What this PR does / why we need it?

Rectify the E2E tests for Qwen3.8-27B speculative decoding to ensure accurate validation.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing CI tests all pass, including the rectified E2E tests for Qwen3.8-27B speculative decoding.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 new end-to-end testing scripts for specific speculative decoding models. The changes focus on rectifying the validation environment for MiniMax-M3-w8a8 and Qwen3.8-27B, ensuring that the speculative decoding mechanisms are correctly configured and verified within the CI pipeline.

Highlights

  • New E2E Tests: Added new end-to-end tests for MiniMax-M3-w8a8 and Qwen3.8-27B speculative decoding to ensure robust validation.
  • Configuration Rectification: Implemented dynamic configuration adjustments for Qwen3.8-27B to disable sliding window support and ensure correct attention behavior during testing.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 the 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 counterproductive. 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.

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.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

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

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.

Code Review

Suggested PR Title:\n\nmarkdown\n[Test][Feature] Add speculative decoding end-to-end tests for MiniMax-M3 and Qwen3.8-27B\n\n\nSuggested PR Summary:\n\nmarkdown\n### What this PR does / why we need it?\nThis pull request adds two new end-to-end speculative decoding tests: `test_eagle3_minimax_m3_w8a8.py` (using 8-way tensor parallelism) and `test_dflash2_qwen38_27b.py` (using 2-way tensor parallelism).\n\nFeedback on the changes highlights two main issues:\n1. Modifying the shared model configuration file (`/mnt/weight/Qwen3.8-27B-DFlash2/config.json`) directly on disk is risky and can lead to permission errors in read-only CI environments or race conditions. It is recommended to use a temporary directory with symlinks instead.\n2. There is a typo in the environment variable `LCCL_DETERMINISTI` (missing the trailing 'C') in both test files, which prevents deterministic execution from being properly enabled.\n\n### Does this PR introduce _any_ user-facing change?\nNo.\n\n### How was this patch tested?\nThis PR adds new end-to-end tests to verify speculative decoding correctness.\n

Comment on lines +73 to +101
draft_model_path = "/mnt/weight/Qwen3.8-27B-DFlash2"
config_path = os.path.join(draft_model_path, "config.json")
if os.path.exists(config_path):
with open(config_path, "r", encoding="utf-8") as f:
config = json.load(f)
if "layer_types" in config and isinstance(config["layer_types"], list):
config["layer_types"] = ["full_attention"] * len(config["layer_types"])
config["sliding_window"] = None
config["use_sliding_window"] = False
with open(config_path, "w", encoding="utf-8") as f:
json.dump(config, f, indent=2)

_run_speculative_decoding(
model_name=model_name,
speculative_config={
"method": "dflash",
"model": "UploadWeight/Qwen3.8-27B-DFlash2",
"num_speculative_tokens": num_speculative_tokens,
"enforce_eager": True,
},
expected_acceptance_length=expected_acceptance_length,
runner_kwargs={
"tensor_parallel_size": 2,
"max_model_len": 8096,
"compilation_config": CompilationConfig(cudagraph_mode="NONE"), # 映射自 compilation-config '{"cudagraph_mode": "NONE"}'
"additional_config": additional_config,
},
is_moe=False,
) No newline at end of file

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.

critical

Modifying the shared model configuration file (/mnt/weight/Qwen3.8-27B-DFlash2/config.json) directly on disk is highly risky. In CI environments, /mnt/weight is often mounted as read-only, which will cause this test to fail with a permission error. Even if writable, modifying it in-place can cause race conditions if other tests run in parallel, or leave persistent side effects that break subsequent tests.\n\nTo prevent this, create a temporary directory, symlink the weight files from the original directory, write the modified config.json there, and pass the temporary directory path as the draft model.

    import tempfile\n\n    draft_model_path = "/mnt/weight/Qwen3.8-27B-DFlash2"\n    config_path = os.path.join(draft_model_path, "config.json")\n\n    with tempfile.TemporaryDirectory() as tmp_dir:\n        tmp_draft_model_path = tmp_dir\n        if os.path.exists(config_path):\n            with open(config_path, "r", encoding="utf-8") as f:\n                config = json.load(f)\n            if "layer_types" in config and isinstance(config["layer_types"], list):\n                config["layer_types"] = ["full_attention"] * len(config["layer_types"])\n            config["sliding_window"] = None\n            config["use_sliding_window"] = False\n\n            for item in os.listdir(draft_model_path):\n                if item != "config.json":\n                    os.symlink(os.path.join(draft_model_path, item), os.path.join(tmp_draft_model_path, item))\n\n            with open(os.path.join(tmp_draft_model_path, "config.json"), "w", encoding="utf-8") as f:\n                json.dump(config, f, indent=2)\n        else:\n            tmp_draft_model_path = "UploadWeight/Qwen3.8-27B-DFlash2"\n\n        _run_speculative_decoding(\n            model_name=model_name,\n            speculative_config={\n                "method": "dflash",\n                "model": tmp_draft_model_path,\n                "num_speculative_tokens": num_speculative_tokens,\n                "enforce_eager": True,\n            },\n            expected_acceptance_length=expected_acceptance_length,\n            runner_kwargs={\n                "tensor_parallel_size": 2,\n                "max_model_len": 8096,\n                "compilation_config": CompilationConfig(cudagraph_mode="NONE"),\n                "additional_config": additional_config,\n            },\n            is_moe=False,\n        )

"TASK_QUEUE_ENABLE": "1",
"VLLM_LOGGING_LEVEL": "INFO",
"VLLM_USE_V2_MODEL_RUNNER": "1",
"LCCL_DETERMINISTI": "1",

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.

high

There is a typo in the environment variable name: LCCL_DETERMINISTI should be LCCL_DETERMINISTIC. Without the trailing 'C', this environment variable will be silently ignored, and deterministic execution for LCCL will not be enabled, potentially leading to non-deterministic test failures.

Suggested change
"LCCL_DETERMINISTI": "1",
"LCCL_DETERMINISTIC": "1",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This parameter is correct.

"HCCL_BUFFSIZE": "1024",
"TASK_QUEUE_ENABLE": "1",
"HCCL_OP_EXPANSION_MODE": "AIV",
"LCCL_DETERMINISTI": "1",

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.

high

There is a typo in the environment variable name: LCCL_DETERMINISTI should be LCCL_DETERMINISTIC. Without the trailing 'C', this environment variable will be silently ignored, and deterministic execution for LCCL will not be enabled, potentially leading to non-deterministic test failures.

Suggested change
"LCCL_DETERMINISTI": "1",
"LCCL_DETERMINISTIC": "1",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This parameter is correct.

Signed-off-by: rainney <1345096680@qq.com>
Signed-off-by: rainney <1345096680@qq.com>
Signed-off-by: rainney <1345096680@qq.com>
Signed-off-by: rainney <1345096680@qq.com>
@sunny-rain-63 sunny-rain-63 changed the title [CI]Recitify MiniMax-M3-w8a8 and Qwen3.8-27B spec decode E2E [CI]Recitify Qwen3.8-27B spec decode E2E Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant