Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Model] Add support for GraniteMoeShared models #13313

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tjohnson31415
Copy link
Contributor

@tjohnson31415 tjohnson31415 commented Feb 15, 2025

Adds support for the granitemoeshared model type which is based on granitemoe but with the addition of a shared experts layer. A preview model with this architecture can be found at ibm-research/moe-7b-1b-active-shared-experts.

transformers support for this GraniteMoeShared model was recently merged and requires transformers >= v4.49.0

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.

🚀


self.input_size = config.hidden_size
self.hidden_size = config.shared_intermediate_size
self.input_linear = MergedColumnParallelLinear(
Copy link
Collaborator

Choose a reason for hiding this comment

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

QQ: why doesn't input_linear support LoRA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking a look!

Honestly, I don't know what is required for a layer to support LoRA... I presume that there is no reason for a simple linear layer not to, but do please let me know if there are reasons I would need to investigate 😅

I added input_linear and output_linear to the supported_lora_modules.

Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
@mergify mergify bot added the documentation Improvements or additions to documentation label Feb 28, 2025
@@ -280,7 +280,12 @@ See [this page](#generative-models) for more information on how to use generativ
* Granite 3.0 MoE, PowerMoE
* `ibm-granite/granite-3.0-1b-a400m-base`, `ibm-granite/granite-3.0-3b-a800m-instruct`, `ibm/PowerMoE-3b`, etc.
* ✅︎
*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did a quick test and PP doesn't seem to work for the GraniteMoe model either.
I can look in to that as a follow-on.

Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
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.

Since it's a test model, we can merge this as long as you can use the model on your end.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) March 1, 2025 06:27
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 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