-
Notifications
You must be signed in to change notification settings - Fork 133
Extend support for different ways to decide if disaggregated PD is required #531
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ccdaef8
Initial step of a configurable pd decider which is responsible for de…
mayabar 8966fa3
update version of GIE + fix lint
mayabar 46be49f
update yaml and the test according prefix plugin configuration change…
mayabar 047b7c3
Update docs/architecture.md
mayabar d2dbf9c
code review
mayabar 2a02a86
code review
mayabar dc66b90
update version of GIE, update prefix_disagr_decider accordingly
mayabar 257deaa
fix typo
mayabar 18ba685
fix PD for short inputs
mayabar 16bc190
Update docs/architecture.md
mayabar e7e4aef
Update pkg/plugins/profile/always_disaggr_decider.go
mayabar 29630ca
Update pkg/plugins/profile/always_disaggr_decider.go
mayabar 8e3bc35
Update pkg/plugins/profile/prefix_disagg_decider.go
mayabar 3c1be93
updates according the PR comments
mayabar 4aaed44
fix test
mayabar 0cf794a
create pd decider plugin type with 2 implementations (for prefix base…
mayabar 5eeec80
fix e2e tests
mayabar f934aa4
changes according the pr comments
mayabar a8d8acc
fix e2e test
mayabar 92452b4
add explanation about pd deciders to disagg_pd doc
mayabar c18dab2
rename always_disaggr_decider to always_disagg_decider
mayabar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,39 @@ | ||
| # Sample EPP configuration for tunning with P/D | ||
| apiVersion: inference.networking.x-k8s.io/v1alpha1 | ||
| kind: EndpointPickerConfig | ||
| featureGates: | ||
| - prepareDataPlugins | ||
| plugins: | ||
| - type: prefill-header-handler | ||
| - type: prefix-cache-scorer | ||
| parameters: | ||
| maxPrefixBlocksToMatch: 256 | ||
| lruCapacityPerServer: 31250 | ||
| - type: queue-scorer | ||
| - type: prefill-filter | ||
| - type: decode-filter | ||
| - type: max-score-picker | ||
| - type: prefix-based-pd-decider | ||
| parameters: | ||
| nonCachedTokens: 16 | ||
| - type: pd-profile-handler | ||
| parameters: | ||
| primaryPort: ${PRIMARY_PORT} | ||
| deciderPluginName: prefix-based-pd-decider | ||
| schedulingProfiles: | ||
| - name: prefill | ||
| plugins: | ||
| - pluginRef: prefill-filter | ||
| - pluginRef: max-score-picker | ||
| - pluginRef: prefix-cache-scorer | ||
| weight: 2 | ||
| - pluginRef: queue-scorer | ||
| weight: 1 | ||
| - name: decode | ||
| plugins: | ||
| - pluginRef: decode-filter | ||
| - pluginRef: max-score-picker | ||
| - pluginRef: prefix-cache-scorer | ||
| weight: 2 | ||
| - pluginRef: queue-scorer | ||
| weight: 1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| package profile | ||
|
|
||
| import ( | ||
| "context" | ||
| "encoding/json" | ||
|
|
||
| "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/framework/interface/plugin" | ||
| "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/framework/interface/scheduling" | ||
| ) | ||
|
|
||
| const ( | ||
| // AlwaysDisaggDeciderPluginType is the type-name of the alwaysDisaggPDDecider plugin. | ||
| AlwaysDisaggDeciderPluginType = "always-disagg-pd-decider" | ||
| ) | ||
|
|
||
| // compile-time type assertion | ||
| var _ pdDeciderPlugin = &AlwaysDisaggPDDecider{} | ||
|
|
||
| // AlwaysDisaggPDDecider is a PD decider plugin which always decide to disaggregate PD | ||
| type AlwaysDisaggPDDecider struct { | ||
| typedName plugin.TypedName | ||
| } | ||
|
|
||
| // AlwaysDisaggPDDeciderPluginFactory defines the factory function for creating | ||
| // a new instance of the AlwaysDisaggPDDecider. | ||
| func AlwaysDisaggPDDeciderPluginFactory(name string, _ json.RawMessage, | ||
| _ plugin.Handle) (plugin.Plugin, error) { | ||
| return newAlwaysDisaggPDDecider().WithName(name), nil | ||
| } | ||
|
|
||
| func newAlwaysDisaggPDDecider() *AlwaysDisaggPDDecider { | ||
| return &AlwaysDisaggPDDecider{} | ||
| } | ||
|
|
||
| // TypedName returns the typed name of the plugin. | ||
| func (d *AlwaysDisaggPDDecider) TypedName() plugin.TypedName { | ||
| return d.typedName | ||
| } | ||
|
|
||
| // WithName sets the name of the plugin. | ||
| func (d *AlwaysDisaggPDDecider) WithName(name string) *AlwaysDisaggPDDecider { | ||
| d.typedName.Name = name | ||
| return d | ||
| } | ||
|
|
||
| func (d *AlwaysDisaggPDDecider) disaggregate(ctx context.Context, inputTokens int, endpoint scheduling.Endpoint) bool { | ||
| return true | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do some evaluation here, kv-cache utilization might be useful to balance on across decode workers.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, there could be multiple factors, including kv-cache utilization that are useful for balancing decode workers. I'll open an issue for the evaluation (#604)