-
-
Notifications
You must be signed in to change notification settings - Fork 15.7k
[PluggableLayer][3/N] Apply PluggableLayer to moe-related layers. #33556
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
Changes from all commits
20d6348
61b9c9c
abfacac
c31134d
cd0c8d1
72f7403
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
| from vllm.config.utils import getattr_iter | ||
| from vllm.distributed import get_dp_group, get_ep_group | ||
| from vllm.forward_context import ForwardContext, get_forward_context | ||
| from vllm.model_executor.custom_op import CustomOp | ||
| from vllm.model_executor.custom_op import PluggableLayer | ||
| from vllm.model_executor.layers.fused_moe import FusedMoE | ||
| from vllm.model_executor.models.interfaces import MixtureOfExperts | ||
| from vllm.model_executor.models.utils import maybe_prefix | ||
|
|
@@ -38,7 +38,7 @@ | |
|
|
||
|
|
||
| # --8<-- [start:transformers_fused_moe] | ||
| @CustomOp.register("transformers_fused_moe") | ||
| @PluggableLayer.register("transformers_fused_moe") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the avoidance of doubt, this is a custom to allow us to accept
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I treat this class as
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was just annotating this particular change so that nobody thinks it can be removed entirely. A quick way to check that it still works is to install transformers from
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hmellor I don't understand your comment either - CustomOp class doesn't affect compilation/Dynamo/cudagraphs. Are you talking about
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see. Yeah it sounds like I should have been referencing TL;DR the Transformers modelling backend needs |
||
| class TransformersFusedMoE(FusedMoE): | ||
| """Custom FusedMoE for the Transformers modeling backend.""" | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.