Skip to content

Conversation

kzjeef
Copy link
Contributor

@kzjeef kzjeef commented Aug 1, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

Add Eagle3 support for Hunyuan V1 models.

Test Plan

  1. End 2 End Unit test
pytest -s vllm/tests/v1/e2e/test_spec_decode.py -k hunyuan

  1. Service
uv run python3 -m vllm.entrypoints.openai.api_server --tensor-parallel-size 1 \
        --port 8000 \
        --speculative_config '{"model": "AngelSlim/Hunyuan-1.8B-Instruct_eagle3", "method" : "eagle3", "draft_tensor_parallel_size" : 1,  "num_speculative_tokens": 2}' --trust-remote-code \
        --model  tencent/Hunyuan-1.8B-Instruct 

Test Result

  1. End 2 End Unit test
    ======================= 1 passed, 5 deselected in 51.72s =======================

  2. Service

(Optional) Documentation Update

Copy link

github-actions bot commented Aug 1, 2025

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@kzjeef kzjeef marked this pull request as draft August 1, 2025 09:57
@mergify mergify bot added new-model Requests to new models speculative-decoding labels Aug 1, 2025
Copy link

mergify bot commented Aug 1, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @kzjeef.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

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 support for Eagle3 speculative decoding to the HunYuan model. The changes are extensive, touching model definitions, configuration, and tests. The core logic for Eagle3 support seems to be implemented in a new file hunyuan_v1_eagle3.py and by modifying hunyuan_v1.py to support auxiliary hidden states.

My review has identified a few critical and high-severity issues:

  • A potential TypeError in hunyuan_v1.py due to an unhandled None value, which could cause a crash.
  • Inappropriate use of inheritance in the new hunyuan_v1_eagle3.py model, which will make the code harder to maintain.
  • A missing type hint in hunyuan_v1.py that was removed instead of being updated.
  • Incomplete test data in tests/models/registry.py which will likely break some tests.

I've provided detailed comments and suggestions for these issues. Addressing them will improve the correctness and maintainability of the code.

@mergify mergify bot removed the needs-rebase label Aug 1, 2025
@kzjeef kzjeef marked this pull request as ready for review August 1, 2025 16:43
@kzjeef kzjeef changed the title [WIP] [Model] Add Eagle3 Support For HunYuan Model [Model] Add Eagle3 Support For HunYuan Model Aug 1, 2025
Copy link

mergify bot commented Aug 2, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @kzjeef.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Thanks, the code LGTM now

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) August 27, 2025 12:39
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 27, 2025
auto-merge was automatically disabled August 29, 2025 06:36

Head branch was pushed to by a user without write access

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) August 29, 2025 06:51
kzjeef and others added 8 commits August 30, 2025 01:12
Fix Hunyuan eagle structure.

accept rate incease, from 16% -> 40% in test case prompt

change review comments.

fix test case.

eagle3: hunyuan fix fc

test: by pass tree attention.

test: refine spec decode code.

test: remove gpu_memory_utilization

Signed-off-by: Asher Zhang <[email protected]>
Signed-off-by: Asher Zhang <[email protected]>
Signed-off-by: Asher Zhang <[email protected]>
auto-merge was automatically disabled August 29, 2025 17:17

Head branch was pushed to by a user without write access

Copy link

mergify bot commented Sep 10, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @kzjeef.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed speculative-decoding v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants