Skip to content

Conversation

@zou3519
Copy link
Collaborator

@zou3519 zou3519 commented Jun 2, 2025

The way the eagle head caching works in vLLM today:

  • there is a base model. This one gets a hash (which is used as the cache dir)
  • the eagle head has its own model. This model is pre-determined by the hash of the base model. The eagle head needs its own cache dir. This PR updates the name of the hash dir to be {base_model}-{eagle_method} for readability reasons.

Test Plan:

  • python vllm/examples/offline_inference/eagle.py and checked the cache directory name.

@github-actions
Copy link

github-actions bot commented Jun 2, 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.

🚀

The way the eagle head caching works in vLLM today is:
- there is a base model. This one gets a hash (which is used as the
  cache dir)
- the eagle head has its own model. This model is pre-determined by the
  hash of the base model. The eagle head needs its own cache dir.
  This PR updates the name of the hash dir to be
  `{base_model}-{eagle_method}` for readability reasons.

Test Plan:
- `python vllm/examples/offline_inference/eagle.py` and checked the
  cache directory name.

Signed-off-by: rzou <[email protected]>
@zou3519 zou3519 force-pushed the eagle_cache_name branch from 6ef4073 to 2d6612a Compare June 2, 2025 15:20
@zou3519 zou3519 requested review from houseroad and youkaichao June 2, 2025 16:09
@zou3519 zou3519 marked this pull request as ready for review June 2, 2025 16:09
@zou3519 zou3519 added the ready ONLY add when PR is ready to merge/full CI is needed label Jun 2, 2025
# calls in a single model, please open an issue and let's discuss.
speculative_config = self.vllm_config.speculative_config
if (speculative_config is not None and speculative_config.use_eagle()):
if compilation_counter.num_graphs_seen == 1:
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we have multiple layers or graph break, how do we handle this?

Copy link
Collaborator Author

@zou3519 zou3519 Jun 2, 2025

Choose a reason for hiding this comment

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

This PR improves on the previous state. It doesn't change anything about it.

multiple layers

The support_torch_compile gets applied on a model with multiple layers. Example:

@support_torch_compile
class Gemma3Model(nn.Module):
. All of these layers go through the same torch.compile

graph break

My understanding is that there are no graph breaks in vLLM. fullgraph is set to True by default:

fullgraph=envs.VLLM_TEST_DYNAMO_FULLGRAPH_CAPTURE,

@youkaichao
Copy link
Member

I added #19064 to address this problem. please take a look.

the problem with this PR, is that it cannot generalize to vision encoders in the future. I expect we might have the following compilation in the end:

  • main language model
  • vision encoder
  • eagle/medusa head

@zou3519
Copy link
Collaborator Author

zou3519 commented Jun 3, 2025

not needed anymore

@zou3519 zou3519 closed this Jun 3, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants