-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve lora autoscaling and kvcache examples (#697)
* Fix issues in lora and autoscaling samples * Change kv cache to pending status and schedule first * Update kv cache examples with correct names * Add missing service for kv cache * Update image for distributed inference
- Loading branch information
Showing
15 changed files
with
264 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,103 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
model.aibrix.ai/name: qwen-coder-1-5b-instruct # Note: The label value `model.aibrix.ai/name` here must match with the service name. | ||
model.aibrix.ai/port: "8000" | ||
adapter.model.aibrix.ai/enabled: "true" | ||
name: qwen-coder-1-5b-instruct | ||
namespace: default | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
model.aibrix.ai/name: qwen-coder-1-5b-instruct | ||
template: | ||
metadata: | ||
labels: | ||
model.aibrix.ai/name: qwen-coder-1-5b-instruct | ||
spec: | ||
containers: | ||
- command: | ||
- python3 | ||
- -m | ||
- vllm.entrypoints.openai.api_server | ||
- --host | ||
- "0.0.0.0" | ||
- --port | ||
- "8000" | ||
- --model | ||
- Qwen/Qwen2.5-Coder-1.5B-Instruct | ||
- --served-model-name | ||
# Note: The `--served-model-name` argument value must also match the Service name and the Deployment label `model.aibrix.ai/name` | ||
- qwen-coder-1-5b-instruct | ||
- --api-key | ||
- sk-kFJ12nKsFakefVmGpj3QzX65s4RbN2xJqWzPYCjYu7wT3BFake | ||
- --enable-lora | ||
image: vllm/vllm-openai:v0.7.1 | ||
imagePullPolicy: Always | ||
name: vllm-openai | ||
env: | ||
- name: VLLM_ALLOW_RUNTIME_LORA_UPDATING | ||
value: "True" | ||
ports: | ||
- containerPort: 8000 | ||
protocol: TCP | ||
resources: | ||
limits: | ||
nvidia.com/gpu: "1" | ||
requests: | ||
nvidia.com/gpu: "1" | ||
- name: aibrix-runtime | ||
image: aibrix/runtime:v0.2.0 | ||
command: | ||
- aibrix_runtime | ||
- --port | ||
- "8080" | ||
env: | ||
- name: INFERENCE_ENGINE | ||
value: vllm | ||
- name: INFERENCE_ENGINE_ENDPOINT | ||
value: http://localhost:8000 | ||
ports: | ||
- containerPort: 8080 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8080 | ||
initialDelaySeconds: 3 | ||
periodSeconds: 2 | ||
readinessProbe: | ||
httpGet: | ||
path: /ready | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
model.aibrix.ai/name: qwen-coder-1-5b-instruct | ||
prometheus-discovery: "true" | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "8080" | ||
name: qwen-coder-1-5b-instruct # Note: The Service name must match the label value `model.aibrix.ai/name` in the Deployment | ||
namespace: default | ||
spec: | ||
ports: | ||
- name: serve | ||
port: 8000 | ||
protocol: TCP | ||
targetPort: 8000 | ||
- name: http | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
model.aibrix.ai/name: qwen-coder-1-5b-instruct | ||
type: ClusterIP |
This file contains 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 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 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 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 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.