Skip to content

Conversation

@RonaldBXu
Copy link
Contributor

@RonaldBXu RonaldBXu commented May 27, 2025

This is a fixed version of #18034 . My previous code overwrote all model attributes, but we should only be overwriting the defaults - I had accidentally also overwrote the 'architectures' attribute that was set a couple lines earlier.

@ekagra-ranjan @DarkLight1337 would appreciate a review, thanks!

RonaldBXu and others added 9 commits May 13, 2025 00:48
Signed-off-by: Ronald Xu <ronaldxu@amazon.com>
Signed-off-by: Ronald Xu <ronaldxu@amazon.com>
Signed-off-by: Ronald Xu <ronaldxu@amazon.com>
Signed-off-by: Ronald Xu <ronaldxu@amazon.com>
Signed-off-by: Ronald Xu <ronaldxu@amazon.com>
@github-actions
Copy link

👋 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.

🚀

@mergify mergify bot added the v1 label May 27, 2025
Copy link
Contributor

@ekagra-ranjan ekagra-ranjan left a comment

Choose a reason for hiding this comment

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

LGTM - can you share where was the architectures overwritten and how was this fixed?

@RonaldBXu
Copy link
Contributor Author

RonaldBXu commented May 27, 2025

@ekagra-ranjan Previously, I had automatically overwrote the attributes of self with self.model. However, vllm adds the "Eagle" or "Eagle3" prefix to the architectures attribute a couple lines above (https://github.com/vllm-project/vllm/blob/main/vllm/transformers_utils/configs/eagle.py#L51), so LlamaForCausalLM -> EagleLlamaForCausalLM. So, my previous commit was overwriting this with the original architecture (because I did not have any conditional statements stopping the setattr(self, k, v)), which caused vllm to assign a target model cls to the draft model. This made it so we were initializing 2 target models so there was duplicate layer error thrown. Now, I respect the prefix addition so the draft model cls is initialized correctly.

I think when I was working on this the code for adding the "Eagle" or "Eagle3" prefix did not exist yet, so I had just modified the config.json file of the Eagle model itself to have the "Eagle" prefix. For example, I modified the architectures field manually in (https://huggingface.co/yuhuili/EAGLE-LLaMA3.1-Instruct-8B/blob/main/config.json) to be EagleLlamaForCausalLM. I guess vllm decided to incorporate the Eagle prefix at runtime rather than have an Eagle model's config.json point to the Eagle cls.

@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label May 28, 2025
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) May 28, 2025 02:43
@DarkLight1337 DarkLight1337 merged commit 5e13c07 into vllm-project:main May 28, 2025
74 checks passed
@RonaldBXu RonaldBXu deleted the llama4-eagle-fixes branch May 28, 2025 21:28
gshtras added a commit to ROCm/vllm that referenced this pull request May 30, 2025
…ft_model_config.hf_config.model_type will get overwritten to the main model type

Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
amitm02 pushed a commit to amitm02/vllm that referenced this pull request Jun 1, 2025
…(2) (vllm-project#18781)

Signed-off-by: Ronald Xu <ronaldxu@amazon.com>
Signed-off-by: amit <amit.man@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants