-
Notifications
You must be signed in to change notification settings - Fork 27
feat(prefill-probe): add learned prefill complexity router #97
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
ryan-lempka
merged 12 commits into
NVIDIA-NeMo:sabhatinas/switch-876-vllm-hidden-state-docs
from
mich-xu:michxu/prefill-complexity-router
Jul 22, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e41278b
feat(prefill-probe): add learned artifact inference
mich-xu f025f7c
feat(prefill-probe): add cost-aware routing policy
mich-xu b621d4f
feat(prefill-probe): add hidden-state feature extraction
mich-xu a60ba03
feat(prefill-probe): add vllm learned scorer
mich-xu 4b03701
feat(prefill-probe): add learned profile configuration
mich-xu 9fb6405
docs(prefill-probe): add deployment guide and sample config
mich-xu 8ea2bd2
feat(prefill-probe): accept explicit probe input
mich-xu ae02bc7
test(benchmark): inject explicit prefill probe input
mich-xu 7f00b7f
docs(prefill-probe): document explicit probe input
mich-xu 18bfa11
feat(prefill-probe): extract Terminus task internally
mich-xu 83d55a7
docs(prefill-probe): document stock Terminus routing
mich-xu 242790e
refactor(prefill-probe): rename config field to checkpoint_dir
mich-xu 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,50 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Local learned prefill-probe profile. Before serving, start the Qwen probe as | ||
| # documented in docs/vllm-serve-hidden-state.md and export: | ||
| # NVIDIA_API_KEY | ||
| # VLLM_BASE_URL=http://127.0.0.1:8000 | ||
| # PREFILL_ROUTER_CHECKPOINT_DIR=/absolute/path/to/exported/router | ||
| # | ||
| # Serve with: | ||
| # switchyard serve --config benchmark/routing-profiles/prefill-probe-local.yaml | ||
| # Clients select this profile by sending model: router. | ||
|
|
||
| endpoints: | ||
| inference-hub: | ||
| base_url: https://inference-api.nvidia.com/v1 | ||
| api_key: ${NVIDIA_API_KEY} | ||
| timeout_secs: 600.0 | ||
| vllm-local: | ||
| base_url: ${VLLM_BASE_URL}/v1 | ||
|
|
||
| targets: | ||
| strong: | ||
| endpoint: inference-hub | ||
| model: aws/anthropic/bedrock-claude-opus-4-7 | ||
| format: anthropic | ||
| probe: | ||
| endpoint: vllm-local | ||
| model: Qwen/Qwen3.6-35B-A3B | ||
| format: openai | ||
| weak: | ||
| endpoint: inference-hub | ||
| model: nvidia/nvidia/nemotron-3-super-120b-long-ctx | ||
| format: openai | ||
|
|
||
| profiles: | ||
| router: | ||
| type: prefill-probe | ||
| probe: probe | ||
| strong: strong | ||
| strong_checkpoint_head: opus-4.7 | ||
| weak: weak | ||
| weak_checkpoint_head: nemotron-3-super | ||
| hidden_states_dir: /tmp/switchyard-hidden-states | ||
| checkpoint_dir: ${PREFILL_ROUTER_CHECKPOINT_DIR} | ||
| routing_policy: | ||
| type: cost-aware | ||
| lambda: 0.5 | ||
| weak_cost: 0 | ||
| strong_cost: 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
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.
Uh oh!
There was an error while loading. Please reload this page.