-
Notifications
You must be signed in to change notification settings - Fork 207
doc: add doc for infernecemodelrewrites. #1978
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zetxqx The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| * **Model Aliasing**: Map a model name in the request body (e.g., `food-review`) to a specific version (e.g., `food-review-v1`). | ||
| * **Generic Fallbacks**: Redirect unknown model requests to a default model. | ||
| * **Traffic Splitting**: Gradually roll out new model versions (Canary deployment) by splitting traffic between two models based on percentage weights. |
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 should be clear here that this is scoped to traffic splitting within an inferencePool; it will not split traffic between two different pools, but two adapters served by the same inferencePool.
We need to have an overall guide that covers all traffic splitting use cases to make it clear which cases are covered by which api and by which component
| Use LoRA adapter rollouts to test improvements, bug fixes, or new features in your LoRA adapters. | ||
|
|
||
| ## Example | ||
| The [`InferenceModelRewrite`](/api-types/inferencemodelrewrite) resource allows platform administrators and model owners to control how inference requests are routed to specific models within an Inference Pool. |
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.
| The [`InferenceModelRewrite`](/api-types/inferencemodelrewrite) resource allows platform administrators and model owners to control how inference requests are routed to specific models within an Inference Pool. | |
| The [`InferenceModelRewrite`](/api-types/inferencemodelrewrite) resource allows platform administrators and model owners to control how inference requests are routed to specific models within an InferencePool. |
| Follow [getting-started](https://gateway-api-inference-extension.sigs.k8s.io/guides/getting-started-latest/#getting-started-with-an-inference-gateway) to set up the IGW stack. | ||
|
|
||
| This guide leverages the LoRA syncer sidecar to dynamically manage adapters within a vLLM deployment, enabling users to add or remove them through a shared ConfigMap. | ||
| In this guide, we modify the LoRA adapters configMap to have two food-review models to better illustrate the gradual rollout scenario. |
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.
| In this guide, we modify the LoRA adapters configMap to have two food-review models to better illustrate the gradual rollout scenario. | |
| In this guide, we modify the LoRA adapters ConfigMap to have two food-review models to better illustrate the gradual rollout scenario. |
| ``` | ||
|
|
||
| Change the ConfigMap to match the following (note the new entry under models): | ||
| The configMap used in this guide is as follows: |
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.
| The configMap used in this guide is as follows: | |
| The ConfigMap used in this guide is as follows: |
| curl http://${IP}/v1/models | jq . | ||
| ``` | ||
|
|
||
| ## Step 1: Establish Baseline (Alias v1) |
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.
| ## Step 1: Establish Baseline (Alias v1) | |
| ## Step 1: Establishing A Baseline (Alias v1) |
|
|
||
| ## Step 2: Gradual Rollout | ||
|
|
||
| Now that `food-review-v2` is loaded (from the Prerequisites step), we can begin splitting traffic. Traffic splitting allows you to divide incoming traffic for a single model name across multiple backend models. This is critical for A/B testing or gradual updates. |
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.
| Now that `food-review-v2` is loaded (from the Prerequisites step), we can begin splitting traffic. Traffic splitting allows you to divide incoming traffic for a single model name across multiple backend models. This is critical for A/B testing or gradual updates. | |
| Now that `food-review-v2` is loaded (from the Prerequisites step), we can begin splitting traffic. Traffic splitting allows you to divide incoming traffic for a single model name across different adapters. This is critical for A/B testing or gradual updates. |
|
|
||
| Now that `food-review-v2` is loaded (from the Prerequisites step), we can begin splitting traffic. Traffic splitting allows you to divide incoming traffic for a single model name across multiple backend models. This is critical for A/B testing or gradual updates. | ||
|
|
||
| ### Scenario: 90/10 Split |
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.
same as in the previous section, recommend removing the header here and just make the following paragraph part of the intro section
| food-review-v2: 3 requests | ||
| ``` | ||
|
|
||
| ### Scenario: 50/50 Split |
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.
ditto
| Try it out: | ||
| A client requests the model `food-review`. We want to ensure this maps strictly to `food-review-v1`. | ||
|
|
||
| ### InferenceModelRewrite |
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.
header 4: ####
| - modelRewrite: "food-review-v1" | ||
| ``` | ||
|
|
||
| ### Result |
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.
ditto, header 4, ####
What type of PR is this?
/kind documentation
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1925
Does this PR introduce a user-facing change?: