refactor: move backend deploy, launch and slurm files from components to examples (#3849)
Signed-off-by: Anant Sharma <anants@nvidia.com>
This commit is contained in:
parent
7835904647
commit
8bd37c96d6
|
|
@ -28,7 +28,7 @@ vllm: &vllm
|
|||
- 'container/Dockerfile.vllm'
|
||||
- 'container/deps/requirements.vllm.txt'
|
||||
- 'container/deps/vllm/**'
|
||||
- 'components/backends/vllm/**'
|
||||
- 'examples/backends/vllm/**'
|
||||
- 'components/src/dynamo/vllm/**'
|
||||
- 'container/build.sh'
|
||||
- 'tests/serve/test_vllm.py'
|
||||
|
|
@ -36,14 +36,14 @@ vllm: &vllm
|
|||
sglang: &sglang
|
||||
- 'container/Dockerfile.sglang'
|
||||
- 'container/Dockerfile.sglang-wideep'
|
||||
- 'components/backends/sglang/**'
|
||||
- 'examples/backends/sglang/**'
|
||||
- 'components/src/dynamo/sglang/**'
|
||||
- 'container/build.sh'
|
||||
- 'tests/serve/test_sglang.py'
|
||||
|
||||
trtllm: &trtllm
|
||||
- 'container/Dockerfile.trtllm'
|
||||
- 'components/backends/trtllm/**'
|
||||
- 'examples/backends/trtllm/**'
|
||||
- 'components/src/dynamo/trtllm/**'
|
||||
- 'container/build.sh'
|
||||
- 'container/build_trtllm_wheel.sh'
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ jobs:
|
|||
export KUBECONFIG=$(pwd)/.kubeconfig
|
||||
kubectl config set-context --current --namespace=$NAMESPACE
|
||||
|
||||
cd components/backends/$FRAMEWORK
|
||||
cd examples/backends/$FRAMEWORK
|
||||
export FRAMEWORK_RUNTIME_IMAGE="${{ secrets.AZURE_ACR_HOSTNAME }}/ai-dynamo/dynamo:${{ github.sha }}-${FRAMEWORK}-amd64"
|
||||
export KUBE_NS=$NAMESPACE
|
||||
export GRAPH_NAME=$(yq e '.metadata.name' $DEPLOYMENT_FILE)
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ Rerun with `curl -N` and change `stream` in the request to `true` to get the res
|
|||
### Deploying Dynamo
|
||||
|
||||
- Follow the [Quickstart Guide](docs/kubernetes/README.md) to deploy on Kubernetes.
|
||||
- Check out [Backends](components/backends) to deploy various workflow configurations (e.g. SGLang with router, vLLM with disaggregated serving, etc.)
|
||||
- Check out [Backends](examples/backends) to deploy various workflow configurations (e.g. SGLang with router, vLLM with disaggregated serving, etc.)
|
||||
- Run some [Examples](examples) to learn about building components in Dynamo and exploring various integrations.
|
||||
|
||||
### Benchmarking Dynamo
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ This directory contains benchmarking scripts and tools for performance evaluatio
|
|||
## Quick Start
|
||||
|
||||
### Benchmark a Dynamo Deployment
|
||||
First, deploy your DynamoGraphDeployment using the [deployment documentation](../components/backends/), then:
|
||||
First, deploy your DynamoGraphDeployment using the [deployment documentation](../docs/kubernetes/), then:
|
||||
|
||||
```bash
|
||||
# Port-forward your deployment to http://localhost:8000
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ console_handler.setFormatter(formatter)
|
|||
logger.addHandler(console_handler)
|
||||
|
||||
|
||||
DEFAULT_SGLANG_CONFIG_PATH = "components/backends/sglang/deploy/disagg.yaml"
|
||||
DEFAULT_SGLANG_CONFIG_PATH = "examples/backends/sglang/deploy/disagg.yaml"
|
||||
|
||||
|
||||
class SGLangConfigModifier:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ console_handler.setFormatter(formatter)
|
|||
logger.addHandler(console_handler)
|
||||
|
||||
|
||||
DEFAULT_TRTLLM_CONFIG_PATH = "components/backends/trtllm/deploy/disagg.yaml"
|
||||
DEFAULT_TRTLLM_CONFIG_PATH = "examples/backends/trtllm/deploy/disagg.yaml"
|
||||
|
||||
|
||||
class TrtllmConfigModifier:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ console_handler.setFormatter(formatter)
|
|||
logger.addHandler(console_handler)
|
||||
|
||||
|
||||
DEFAULT_VLLM_CONFIG_PATH = "components/backends/vllm/deploy/disagg.yaml"
|
||||
DEFAULT_VLLM_CONFIG_PATH = "examples/backends/vllm/deploy/disagg.yaml"
|
||||
|
||||
|
||||
class VllmV1ConfigModifier:
|
||||
|
|
|
|||
|
|
@ -19,25 +19,17 @@ limitations under the License.
|
|||
|
||||
This directory contains the core components that make up the Dynamo inference framework. Each component serves a specific role in the distributed LLM serving architecture, enabling high-throughput, low-latency inference across multiple nodes and GPUs.
|
||||
|
||||
## Supported Inference Engines
|
||||
|
||||
Dynamo supports multiple inference engines (with a focus on SGLang, vLLM, and TensorRT-LLM), each with their own deployment configurations and capabilities:
|
||||
|
||||
- **[vLLM](/docs/backends/vllm/README.md)** - High-performance LLM inference with native KV cache events and NIXL-based transfer mechanisms
|
||||
- **[SGLang](/docs/backends/sglang/README.md)** - Structured generation language framework with ZMQ-based communication
|
||||
- **[TensorRT-LLM](/docs/backends/trtllm/README.md)** - NVIDIA's optimized LLM inference engine with TensorRT acceleration
|
||||
|
||||
Each engine provides launch scripts for different deployment patterns in their respective `/launch` & `/deploy` directories.
|
||||
|
||||
## Core Components
|
||||
|
||||
### [Backends](backends/)
|
||||
### Backends
|
||||
|
||||
The backends directory contains inference engine integrations and implementations, with a key focus on:
|
||||
Dynamo supports multiple inference engines, each with their own deployment configurations and capabilities:
|
||||
|
||||
- **vLLM** - Full-featured vLLM integration with disaggregated serving, KV-aware routing, and SLA-based planning
|
||||
- **SGLang** - SGLang engine integration supporting disaggregated serving and KV-aware routing
|
||||
- **TensorRT-LLM** - TensorRT-LLM integration with disaggregated serving capabilities
|
||||
- **[vLLM](/docs/backends/vllm/README.md)** - Full-featured vLLM integration with disaggregated serving, KV-aware routing, SLA-based planning, native KV cache events, and NIXL-based transfer mechanisms
|
||||
- **[SGLang](/docs/backends/sglang/README.md)** - SGLang engine integration with ZMQ-based communication, supporting disaggregated serving and KV-aware routing
|
||||
- **[TensorRT-LLM](/docs/backends/trtllm/README.md)** - TensorRT-LLM integration with disaggregated serving capabilities and TensorRT acceleration
|
||||
|
||||
Each engine provides launch and deploy scripts for different deployment patterns in the [examples](../examples/backends/) folder.
|
||||
|
||||
|
||||
### [Frontend](src/dynamo/frontend/)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Clients query the `find_best_worker` endpoint to determine which worker should p
|
|||
>
|
||||
> Use this manual setup if you need explicit control over prefill routing configuration or want to manage prefill and decode routers separately.
|
||||
|
||||
See [`components/backends/vllm/launch/disagg_router.sh`](/components/backends/vllm/launch/disagg_router.sh) for a complete example.
|
||||
See [`examples/backends/vllm/launch/disagg_router.sh`](/examples/backends/vllm/launch/disagg_router.sh) for a complete example.
|
||||
|
||||
```bash
|
||||
# Start frontend router for decode workers
|
||||
|
|
|
|||
|
|
@ -87,4 +87,4 @@ ENV PATH=/usr/local/bin/etcd:$PATH
|
|||
# Enable forceful shutdown of inflight requests
|
||||
ENV SGL_FORCE_SHUTDOWN=1
|
||||
|
||||
WORKDIR /sgl-workspace/dynamo/components/backends/sglang
|
||||
WORKDIR /sgl-workspace/dynamo/examples/backends/sglang
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ This approach allows you to install Dynamo directly using a DynamoGraphDeploymen
|
|||
Here is how you would install a VLLM inference backend example.
|
||||
|
||||
```bash
|
||||
helm upgrade --install dynamo-graph ./deploy/helm/chart -n dynamo-cloud -f ./components/backends/vllm/deploy/agg.yaml
|
||||
helm upgrade --install dynamo-graph ./deploy/helm/chart -n dynamo-cloud -f ./examples/backends/vllm/deploy/agg.yaml
|
||||
```
|
||||
|
||||
### Installation using Grove
|
||||
|
|
@ -41,7 +41,7 @@ helm upgrade --install dynamo-graph ./deploy/helm/chart -n dynamo-cloud -f ./com
|
|||
Same example as above, but using Grove PodCliqueSet resources.
|
||||
|
||||
```bash
|
||||
helm upgrade --install dynamo-graph ./deploy/helm/chart -n dynamo-cloud -f ./components/backends/vllm/deploy/agg.yaml --set deploymentType=grove
|
||||
helm upgrade --install dynamo-graph ./deploy/helm/chart -n dynamo-cloud -f ./examples/backends/vllm/deploy/agg.yaml --set deploymentType=grove
|
||||
```
|
||||
|
||||
### Customizable Properties
|
||||
|
|
@ -50,7 +50,7 @@ You can override the default configuration by setting the following properties:
|
|||
|
||||
```bash
|
||||
helm upgrade --install dynamo-graph ./deploy/helm/chart -n dynamo-cloud \
|
||||
-f ./components/backends/vllm/deploy/agg.yaml \
|
||||
-f ./examples/backends/vllm/deploy/agg.yaml \
|
||||
--set "imagePullSecrets[0].name=docker-secret-1" \
|
||||
--set etcdAddr="my-etcd-service:2379" \
|
||||
--set natsAddr="nats://my-nats-service:4222"
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ kubectl get gateway inference-gateway -n my-model
|
|||
|
||||
### 3. Deploy Your Model ###
|
||||
|
||||
Follow the steps in [model deployment](../../components/backends/vllm/deploy/README.md) to deploy `Qwen/Qwen3-0.6B` model in aggregate mode using [agg.yaml](../../components/backends/vllm/deploy/agg.yaml) in `my-model` kubernetes namespace.
|
||||
Follow the steps in [model deployment](../../examples/backends/vllm/deploy/README.md) to deploy `Qwen/Qwen3-0.6B` model in aggregate mode using [agg.yaml](../../examples/backends/vllm/deploy/agg.yaml) in `my-model` kubernetes namespace.
|
||||
|
||||
Sample commands to deploy model:
|
||||
|
||||
```bash
|
||||
cd <dynamo-source-root>/components/backends/vllm/deploy
|
||||
cd <dynamo-source-root>/examples/backends/vllm/deploy
|
||||
kubectl apply -f agg.yaml -n my-model
|
||||
```
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ kubectl create secret generic hf-token-secret \
|
|||
```
|
||||
|
||||
Create a model configuration file similar to the vllm_agg_qwen.yaml for your model.
|
||||
This file demonstrates the values needed for the Vllm Agg setup in [agg.yaml](../../components/backends/vllm/deploy/agg.yaml)
|
||||
This file demonstrates the values needed for the Vllm Agg setup in [agg.yaml](../../examples/backends/vllm/deploy/agg.yaml)
|
||||
Take a note of the model's block size provided in the model card.
|
||||
|
||||
### 4. Install Dynamo GAIE helm chart ###
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ Run the vLLM disaggregated script with tracing enabled:
|
|||
|
||||
```bash
|
||||
# Navigate to vLLM launch directory
|
||||
cd components/backends/vllm/launch
|
||||
cd examples/backends/vllm/launch
|
||||
|
||||
# Run disaggregated deployment (modify the script to export env vars first)
|
||||
./disagg.sh
|
||||
|
|
@ -179,7 +179,7 @@ For Kubernetes deployments, ensure you have a Tempo instance deployed and access
|
|||
|
||||
### Modify DynamoGraphDeployment for Tracing
|
||||
|
||||
Add common tracing environment variables at the top level and service-specific names in each component in your `DynamoGraphDeployment` (e.g., `components/backends/vllm/deploy/disagg.yaml`):
|
||||
Add common tracing environment variables at the top level and service-specific names in each component in your `DynamoGraphDeployment` (e.g., `examples/backends/vllm/deploy/disagg.yaml`):
|
||||
|
||||
```yaml
|
||||
apiVersion: nvidia.com/v1alpha1
|
||||
|
|
@ -228,7 +228,7 @@ spec:
|
|||
Apply the updated DynamoGraphDeployment:
|
||||
|
||||
```bash
|
||||
kubectl apply -f components/backends/vllm/deploy/disagg.yaml
|
||||
kubectl apply -f examples/backends/vllm/deploy/disagg.yaml
|
||||
```
|
||||
|
||||
Traces will now be exported to Tempo and can be viewed in Grafana.
|
||||
|
|
|
|||
|
|
@ -182,14 +182,14 @@ docker compose -f deploy/docker-compose.yml up -d
|
|||
### Aggregated Serving
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/agg.sh
|
||||
```
|
||||
|
||||
### Aggregated Serving with KV Routing
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/agg_router.sh
|
||||
```
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ cd $DYNAMO_HOME/components/backends/sglang
|
|||
Here's an example that uses the [Qwen/Qwen3-Embedding-4B](https://huggingface.co/Qwen/Qwen3-Embedding-4B) model.
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/agg_embed.sh
|
||||
```
|
||||
|
||||
|
|
@ -222,14 +222,14 @@ See [SGLang Disaggregation](sglang-disaggregation.md) to learn more about how sg
|
|||
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/disagg.sh
|
||||
```
|
||||
|
||||
### Disaggregated Serving with KV Aware Prefill Routing
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/disagg_router.sh
|
||||
```
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ You can use this configuration to test out disaggregated serving with dp attenti
|
|||
|
||||
```bash
|
||||
# note this will require 4 GPUs
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/disagg_dp_attn.sh
|
||||
```
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ Below we provide a selected list of advanced examples. Please open up an issue i
|
|||
We currently provide deployment examples for Kubernetes and SLURM.
|
||||
|
||||
## Kubernetes
|
||||
- **[Deploying Dynamo with SGLang on Kubernetes](../../../components/backends/sglang/deploy/README.md)**
|
||||
- **[Deploying Dynamo with SGLang on Kubernetes](../../../examples/backends/sglang/deploy/README.md)**
|
||||
|
||||
## SLURM
|
||||
- **[Deploying Dynamo with SGLang on SLURM](../../../components/backends/sglang/slurm_jobs/README.md)**
|
||||
- **[Deploying Dynamo with SGLang on SLURM](../../../examples/backends/sglang/slurm_jobs/README.md)**
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ docker run \
|
|||
dynamo-wideep:latest
|
||||
```
|
||||
|
||||
In each container, you should be in the `/sgl-workspace/dynamo/components/backends/sglang` directory.
|
||||
In each container, you should be in the `/sgl-workspace/dynamo/examples/backends/sglang` directory.
|
||||
|
||||
3. Run the ingress and prefill worker
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ flowchart LR
|
|||
```
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/multimodal_agg.sh
|
||||
```
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ flowchart LR
|
|||
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/sglang
|
||||
cd $DYNAMO_HOME/examples/backends/sglang
|
||||
./launch/multimodal_disagg.sh
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -128,13 +128,13 @@ This figure shows an overview of the major components to deploy:
|
|||
|
||||
### Aggregated
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
./launch/agg.sh
|
||||
```
|
||||
|
||||
### Aggregated with KV Routing
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
./launch/agg_router.sh
|
||||
```
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ cd $DYNAMO_HOME/components/backends/trtllm
|
|||
> Disaggregated serving supports two strategies for request flow: `"prefill_first"` and `"decode_first"`. By default, the script below uses the `"decode_first"` strategy, which can reduce response latency by minimizing extra hops in the return path. You can switch strategies by setting the `DISAGGREGATION_STRATEGY` environment variable.
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
./launch/disagg.sh
|
||||
```
|
||||
|
||||
|
|
@ -154,13 +154,13 @@ cd $DYNAMO_HOME/components/backends/trtllm
|
|||
> Disaggregated serving with KV routing uses a "prefill first" workflow by default. Currently, Dynamo supports KV routing to only one endpoint per model. In disaggregated workflow, it is generally more effective to route requests to the prefill worker. If you wish to use a "decode first" workflow instead, you can simply set the `DISAGGREGATION_STRATEGY` environment variable accordingly.
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
./launch/disagg_router.sh
|
||||
```
|
||||
|
||||
### Aggregated with Multi-Token Prediction (MTP) and DeepSeek R1
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
|
||||
export AGG_ENGINE_ARGS=./recipes/deepseek-r1/trtllm/mtp/mtp_agg.yaml
|
||||
export SERVED_MODEL_NAME="nvidia/DeepSeek-R1-FP4"
|
||||
|
|
@ -186,7 +186,7 @@ For comprehensive instructions on multinode serving, see the [multinode-examples
|
|||
|
||||
### Kubernetes Deployment
|
||||
|
||||
For complete Kubernetes deployment instructions, configurations, and troubleshooting, see [TensorRT-LLM Kubernetes Deployment Guide](../../../components/backends/trtllm/deploy/README.md).
|
||||
For complete Kubernetes deployment instructions, configurations, and troubleshooting, see [TensorRT-LLM Kubernetes Deployment Guide](../../../examples/backends/trtllm/deploy/README.md).
|
||||
|
||||
### Client
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ Logits processors let you modify the next-token logits at every decoding step (e
|
|||
You can enable a test-only processor that forces the model to respond with "Hello world!". This is useful to verify the wiring without modifying your model or engine code.
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
export DYNAMO_ENABLE_TEST_LOGITS_PROCESSOR=1
|
||||
./launch/agg.sh
|
||||
```
|
||||
|
|
@ -316,7 +316,7 @@ sampling_params.logits_processor = create_trtllm_adapters(processors)
|
|||
|
||||
## Performance Sweep
|
||||
|
||||
For detailed instructions on running comprehensive performance sweeps across both aggregated and disaggregated serving configurations, see the [TensorRT-LLM Benchmark Scripts for DeepSeek R1 model](../../../components/backends/trtllm/performance_sweeps/README.md). This guide covers recommended benchmarking setups, usage of provided scripts, and best practices for evaluating system performance.
|
||||
For detailed instructions on running comprehensive performance sweeps across both aggregated and disaggregated serving configurations, see the [TensorRT-LLM Benchmark Scripts for DeepSeek R1 model](../../../examples/backends/trtllm/performance_sweeps/README.md). This guide covers recommended benchmarking setups, usage of provided scripts, and best practices for evaluating system performance.
|
||||
|
||||
## Dynamo KV Block Manager Integration
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ VSWA is a mechanism in which a model’s layers alternate between multiple slidi
|
|||
|
||||
## Aggregated Serving
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
export MODEL_PATH=google/gemma-3-1b-it
|
||||
export SERVED_MODEL_NAME=$MODEL_PATH
|
||||
export AGG_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_agg.yaml
|
||||
|
|
@ -36,7 +36,7 @@ export AGG_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_agg.yaml
|
|||
|
||||
## Aggregated Serving with KV Routing
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
export MODEL_PATH=google/gemma-3-1b-it
|
||||
export SERVED_MODEL_NAME=$MODEL_PATH
|
||||
export AGG_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_agg.yaml
|
||||
|
|
@ -45,7 +45,7 @@ export AGG_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_agg.yaml
|
|||
|
||||
## Disaggregated Serving
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
export MODEL_PATH=google/gemma-3-1b-it
|
||||
export SERVED_MODEL_NAME=$MODEL_PATH
|
||||
export PREFILL_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_prefill.yaml
|
||||
|
|
@ -55,7 +55,7 @@ export DECODE_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_decode.yaml
|
|||
|
||||
## Disaggregated Serving with KV Routing
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
export MODEL_PATH=google/gemma-3-1b-it
|
||||
export SERVED_MODEL_NAME=$MODEL_PATH
|
||||
export PREFILL_ENGINE_ARGS=$DYNAMO_HOME/recipes/gemma3/trtllm/vswa_prefill.yaml
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ You can use the provided launch script or run the components manually:
|
|||
#### Option A: Using the Launch Script
|
||||
|
||||
```bash
|
||||
cd /workspace/components/backends/trtllm
|
||||
cd /workspace/examples/backends/trtllm
|
||||
./launch/gpt_oss_disagg.sh
|
||||
```
|
||||
|
||||
|
|
@ -136,8 +136,6 @@ cd /workspace/components/backends/trtllm
|
|||
|
||||
1. **Start frontend**:
|
||||
```bash
|
||||
cd /workspace/dynamo/components/backends/trtllm
|
||||
|
||||
# Start frontend with round-robin routing
|
||||
python3 -m dynamo.frontend --router-mode round-robin --http-port 8000 &
|
||||
```
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ inside an interactive shell on one of the allocated nodes, set the
|
|||
following environment variables based:
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
|
||||
export IMAGE="<dynamo_trtllm_image>"
|
||||
# export MOUNTS="${PWD}/:/mnt,/lustre:/lustre"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ To enable it build the dynamo container with the `--tensorrtllm-commit` flag, fo
|
|||
## How to use
|
||||
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/trtllm
|
||||
cd $DYNAMO_HOME/examples/backends/trtllm
|
||||
|
||||
# Launch 3-worker EPD flow with NIXL
|
||||
./launch/epd_disagg.sh
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ For simplicity of the example, we will make some assumptions about your slurm cl
|
|||
If your cluster supports similar container based plugins, you may be able to
|
||||
modify the script to use that instead.
|
||||
3. Third, we assume you have already built a recent Dynamo+TRTLLM container image as
|
||||
described [here](https://github.com/ai-dynamo/dynamo/tree/main/components/backends/trtllm#build-docker).
|
||||
described [here](https://github.com/ai-dynamo/dynamo/tree/main/docs/backends/trtllm/README.md#build-container).
|
||||
This is the image that can be set to the `IMAGE` environment variable in later steps.
|
||||
4. Fourth, we assume you pre-allocate a group of nodes using `salloc`. We
|
||||
will allocate 8 nodes below as a reference command to have enough capacity
|
||||
|
|
@ -87,7 +87,7 @@ following environment variables based:
|
|||
```bash
|
||||
# NOTE: IMAGE must be set manually for now
|
||||
# To build an iamge, see the steps here:
|
||||
# https://github.com/ai-dynamo/dynamo/tree/main/components/backends/trtllm#build-docker
|
||||
# https://github.com/ai-dynamo/dynamo/tree/main/docs/backends/trtllm/README.md#build-container
|
||||
export IMAGE="<dynamo_trtllm_image>"
|
||||
|
||||
# MOUNTS are the host:container path pairs that are mounted into the containers
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ following environment variables based:
|
|||
```bash
|
||||
# NOTE: IMAGE must be set manually for now
|
||||
# To build an iamge, see the steps here:
|
||||
# https://github.com/ai-dynamo/dynamo/tree/main/components/backends/trtllm#build-docker
|
||||
# https://github.com/ai-dynamo/dynamo/tree/main/docs/backends/trtllm/README.md#build-container
|
||||
export IMAGE="<dynamo_trtllm_image>"
|
||||
|
||||
# MOUNTS are the host:container path pairs that are mounted into the containers
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ For advanced configurations, LMCache supports multiple [storage backends](https:
|
|||
Use the provided launch script for quick setup:
|
||||
|
||||
```bash
|
||||
./components/backends/vllm/launch/agg_lmcache.sh
|
||||
./examples/backends/vllm/launch/agg_lmcache.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
|
|
@ -69,7 +69,7 @@ The same `ENABLE_LMCACHE=1` environment variable enables LMCache, but the system
|
|||
Use the provided disaggregated launch script(the script requires at least 2 GPUs):
|
||||
|
||||
```bash
|
||||
./components/backends/vllm/launch/disagg_lmcache.sh
|
||||
./examples/backends/vllm/launch/disagg_lmcache.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ Note: The above architecture illustrates all the components. The final component
|
|||
|
||||
```bash
|
||||
# requires one gpu
|
||||
cd components/backends/vllm
|
||||
cd examples/backends/vllm
|
||||
bash launch/agg.sh
|
||||
```
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ bash launch/agg.sh
|
|||
|
||||
```bash
|
||||
# requires two gpus
|
||||
cd components/backends/vllm
|
||||
cd examples/backends/vllm
|
||||
bash launch/agg_router.sh
|
||||
```
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ bash launch/agg_router.sh
|
|||
|
||||
```bash
|
||||
# requires two gpus
|
||||
cd components/backends/vllm
|
||||
cd examples/backends/vllm
|
||||
bash launch/disagg.sh
|
||||
```
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ bash launch/disagg.sh
|
|||
|
||||
```bash
|
||||
# requires three gpus
|
||||
cd components/backends/vllm
|
||||
cd examples/backends/vllm
|
||||
bash launch/disagg_router.sh
|
||||
```
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ This example is not meant to be performant but showcases Dynamo routing to data
|
|||
|
||||
```bash
|
||||
# requires four gpus
|
||||
cd components/backends/vllm
|
||||
cd examples/backends/vllm
|
||||
bash launch/dep.sh
|
||||
```
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ Below we provide a selected list of advanced deployments. Please open up an issu
|
|||
|
||||
### Kubernetes Deployment
|
||||
|
||||
For complete Kubernetes deployment instructions, configurations, and troubleshooting, see [vLLM Kubernetes Deployment Guide](../../../components/backends/vllm/deploy/README.md)
|
||||
For complete Kubernetes deployment instructions, configurations, and troubleshooting, see [vLLM Kubernetes Deployment Guide](../../../examples/backends/vllm/deploy/README.md)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ Follow these steps to benchmark Dynamo deployments using client-side benchmarkin
|
|||
Set up your Kubernetes cluster with NVIDIA GPUs and install the Dynamo Cloud platform. First follow the [installation guide](/docs/kubernetes/installation_guide.md) to install Dynamo Cloud, then use [deploy/utils/README](../../deploy/utils/README.md) to set up benchmarking resources.
|
||||
|
||||
### Step 2: Deploy DynamoGraphDeployments
|
||||
Deploy your DynamoGraphDeployments separately using the [deployment documentation](../../components/backends/). Each deployment should have a frontend service exposed.
|
||||
Deploy your DynamoGraphDeployments separately using the [deployment documentation](../../examples/backends/). Each deployment should have a frontend service exposed.
|
||||
|
||||
### Step 3: Port-Forward and Benchmark Deployment A
|
||||
```bash
|
||||
|
|
@ -332,7 +332,7 @@ The server-side benchmarking solution:
|
|||
## Quick Start
|
||||
|
||||
### Step 1: Deploy Your DynamoGraphDeployment
|
||||
Deploy your DynamoGraphDeployment using the [deployment documentation](../../components/backends/). Ensure it has a frontend service exposed.
|
||||
Deploy your DynamoGraphDeployment using the [deployment documentation](../../examples/backends/). Ensure it has a frontend service exposed.
|
||||
|
||||
### Step 2: Deploy and Run Benchmark Job
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ spec:
|
|||
- gpu-h200-sxm # Adjust to your GPU node type
|
||||
mainContainer:
|
||||
image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:0.5.0
|
||||
workingDir: /workspace/components/backends/vllm
|
||||
workingDir: /workspace/examples/backends/vllm
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
|
|
@ -234,7 +234,7 @@ spec:
|
|||
- gpu-h200-sxm # Adjust to your GPU node type
|
||||
mainContainer:
|
||||
image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:0.5.0
|
||||
workingDir: /workspace/components/backends/vllm
|
||||
workingDir: /workspace/examples/backends/vllm
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Dynamo's `DistributedRuntime` is the core infrastructure in the framework that e
|
|||
|
||||
While theoretically each `DistributedRuntime` can have multiple `Namespace`s as long as their names are unique (similar logic also applies to `Component/Namespace` and `Endpoint/Component`), in practice, each dynamo components typically are deployed with its own process and thus has its own `DistributedRuntime` object. However, they share the same namespace to discover each other.
|
||||
|
||||
For example, a typical deployment configuration (like `components/backends/vllm/deploy/agg.yaml` or `components/backends/sglang/deploy/agg.yaml`) has multiple workers:
|
||||
For example, a typical deployment configuration (like `examples/backends/vllm/deploy/agg.yaml` or `examples/backends/sglang/deploy/agg.yaml`) has multiple workers:
|
||||
|
||||
- `Frontend`: Starts an HTTP server and handles incoming requests. The HTTP server routes all requests to the `Processor`.
|
||||
- `Processor`: When a new request arrives, `Processor` applies the chat template and performs the tokenization.
|
||||
|
|
@ -75,6 +75,6 @@ After selecting which endpoint to hit, the `Client` sends the serialized request
|
|||
We provide native rust and python (through binding) examples for basic usage of `DistributedRuntime`:
|
||||
|
||||
- Rust: `/lib/runtime/examples/`
|
||||
- Python: We also provide complete examples of using `DistributedRuntime`. Please refer to the engines in `/components/backends` for full implementation details.
|
||||
- Python: We also provide complete examples of using `DistributedRuntime`. Please refer to the engines in `components/src/dynamo` for full implementation details.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
|
||||
# Dynamo Architecture Flow
|
||||
|
||||
This diagram shows the NVIDIA Dynamo disaggregated inference system as implemented in [components/backends/vllm](../../components/backends/vllm). Color-coded flows indicate different types of operations:
|
||||
This diagram shows the NVIDIA Dynamo disaggregated inference system as implemented in [examples/backends/vllm](../../examples/backends/vllm). Color-coded flows indicate different types of operations:
|
||||
|
||||
## 🔵 Main Request Flow (Blue)
|
||||
The primary user journey through the system:
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ The `model_type` can be:
|
|||
- `migration_limit`: Maximum number of times a request may be [migrated to another Instance](../fault_tolerance/request_migration.md). Defaults to 0.
|
||||
- `user_data`: Optional dictionary containing custom metadata for worker behavior (e.g., LoRA configuration). Defaults to None.
|
||||
|
||||
See `components/backends` for full code examples.
|
||||
See `examples/backends` for full code examples.
|
||||
|
||||
## Component names
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ Each backend has deployment examples and configuration options:
|
|||
|
||||
| Backend | Aggregated | Aggregated + Router | Disaggregated | Disaggregated + Router | Disaggregated + Planner | Disaggregated Multi-node |
|
||||
|--------------|:----------:|:-------------------:|:-------------:|:----------------------:|:-----------------------:|:------------------------:|
|
||||
| **[SGLang](../../components/backends/sglang/deploy/README.md)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| **[TensorRT-LLM](../../components/backends/trtllm/deploy/README.md)** | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ |
|
||||
| **[vLLM](../../components/backends/vllm/deploy/README.md)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| **[SGLang](../../examples/backends/sglang/deploy/README.md)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| **[TensorRT-LLM](../../examples/backends/trtllm/deploy/README.md)** | ✅ | ✅ | ✅ | ✅ | 🚧 | ✅ |
|
||||
| **[vLLM](../../examples/backends/vllm/deploy/README.md)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
## 3. Deploy Your First Model
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ kubectl create secret generic hf-token-secret \
|
|||
-n ${NAMESPACE};
|
||||
|
||||
# Deploy any example (this uses vLLM with Qwen model using aggregated serving)
|
||||
kubectl apply -f components/backends/vllm/deploy/agg.yaml -n ${NAMESPACE}
|
||||
kubectl apply -f examples/backends/vllm/deploy/agg.yaml -n ${NAMESPACE}
|
||||
|
||||
# Check status
|
||||
kubectl get dynamoGraphDeployment -n ${NAMESPACE}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Creating Kubernetes Deployments
|
||||
|
||||
The scripts in the `components/<backend>/launch` folder like [agg.sh](../../../components/backends/vllm/launch/agg.sh) demonstrate how you can serve your models locally.
|
||||
The corresponding YAML files like [agg.yaml](../../../components/backends/vllm/deploy/agg.yaml) show you how you could create a Kubernetes deployment for your inference graph.
|
||||
The scripts in the `examples/<backend>/launch` folder like [agg.sh](../../../examples/backends/vllm/launch/agg.sh) demonstrate how you can serve your models locally.
|
||||
The corresponding YAML files like [agg.yaml](../../../examples/backends/vllm/deploy/agg.yaml) show you how you could create a Kubernetes deployment for your inference graph.
|
||||
|
||||
This guide explains how to create your own deployment files.
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ Before choosing a template, understand the different architecture patterns:
|
|||
- GPU utilization may not be optimal (prefill and decode compete for resources)
|
||||
- Lower throughput ceiling compared to disaggregated
|
||||
|
||||
**Example**: [`agg.yaml`](../../../components/backends/vllm/deploy/agg.yaml)
|
||||
**Example**: [`agg.yaml`](../../../examples/backends/vllm/deploy/agg.yaml)
|
||||
|
||||
### Aggregated + Router (agg_router.yaml)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ Before choosing a template, understand the different architecture patterns:
|
|||
- Still has GPU underutilization issues of aggregated serving
|
||||
- More complex than plain aggregated but simpler than disaggregated
|
||||
|
||||
**Example**: [`agg_router.yaml`](../../../components/backends/vllm/deploy/agg_router.yaml)
|
||||
**Example**: [`agg_router.yaml`](../../../examples/backends/vllm/deploy/agg_router.yaml)
|
||||
|
||||
### Disaggregated Serving (disagg_router.yaml)
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ Before choosing a template, understand the different architecture patterns:
|
|||
- More complex setup and debugging
|
||||
- Requires understanding of prefill/decode separation
|
||||
|
||||
**Example**: [`disagg_router.yaml`](../../../components/backends/vllm/deploy/disagg_router.yaml)
|
||||
**Example**: [`disagg_router.yaml`](../../../examples/backends/vllm/deploy/disagg_router.yaml)
|
||||
|
||||
### Quick Selection Guide
|
||||
|
||||
|
|
@ -69,11 +69,11 @@ Select the architecture pattern as your template that best fits your use case.
|
|||
|
||||
For example, when using the `vLLM` backend:
|
||||
|
||||
- **Development / Testing**: Use [`agg.yaml`](../../../components/backends/vllm/deploy/agg.yaml) as the base configuration.
|
||||
- **Development / Testing**: Use [`agg.yaml`](../../../examples/backends/vllm/deploy/agg.yaml) as the base configuration.
|
||||
|
||||
- **Production with Load Balancing**: Use [`agg_router.yaml`](../../../components/backends/vllm/deploy/agg_router.yaml) to enable scalable, load-balanced inference.
|
||||
- **Production with Load Balancing**: Use [`agg_router.yaml`](../../../examples/backends/vllm/deploy/agg_router.yaml) to enable scalable, load-balanced inference.
|
||||
|
||||
- **High Performance / Disaggregated Deployment**: Use [`disagg_router.yaml`](../../../components/backends/vllm/deploy/disagg_router.yaml) for maximum throughput and modular scalability.
|
||||
- **High Performance / Disaggregated Deployment**: Use [`disagg_router.yaml`](../../../examples/backends/vllm/deploy/disagg_router.yaml) for maximum throughput and modular scalability.
|
||||
|
||||
|
||||
## Step 2: Customize the Template
|
||||
|
|
|
|||
|
|
@ -281,8 +281,8 @@ To enable compilation cache, add a volume mount with `useAsCompilationCache: tru
|
|||
|
||||
For additional support and examples, see the working multinode configurations in:
|
||||
|
||||
- **SGLang**: [components/backends/sglang/deploy/](../../../components/backends/sglang/deploy/)
|
||||
- **TensorRT-LLM**: [components/backends/trtllm/deploy/](../../../components/backends/trtllm/deploy/)
|
||||
- **vLLM**: [components/backends/vllm/deploy/](../../../components/backends/vllm/deploy/)
|
||||
- **SGLang**: [examples/backends/sglang/deploy/](../../../examples/backends/sglang/deploy/)
|
||||
- **TensorRT-LLM**: [examples/backends/trtllm/deploy/](../../../examples/backends/trtllm/deploy/)
|
||||
- **vLLM**: [examples/backends/vllm/deploy/](../../../examples/backends/vllm/deploy/)
|
||||
|
||||
These examples demonstrate proper usage of the `multinode` section with corresponding `gpu` limits and correct `tp-size` configuration.
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ kubectl get pods -n ${NAMESPACE}
|
|||
1. **Deploy Model/Workflow**
|
||||
```bash
|
||||
# Example: Deploy a vLLM workflow with Qwen3-0.6B using aggregated serving
|
||||
kubectl apply -f components/backends/vllm/deploy/agg.yaml -n ${NAMESPACE}
|
||||
kubectl apply -f examples/backends/vllm/deploy/agg.yaml -n ${NAMESPACE}
|
||||
|
||||
# Port forward and test
|
||||
kubectl port-forward svc/agg-vllm-frontend 8000:8000 -n ${NAMESPACE}
|
||||
|
|
@ -251,9 +251,9 @@ kubectl get pods -n ${NAMESPACE}
|
|||
```
|
||||
|
||||
2. **Explore Backend Guides**
|
||||
- [vLLM Deployments](../../components/backends/vllm/deploy/README.md)
|
||||
- [SGLang Deployments](../../components/backends/sglang/deploy/README.md)
|
||||
- [TensorRT-LLM Deployments](../../components/backends/trtllm/deploy/README.md)
|
||||
- [vLLM Deployments](../../examples/backends/vllm/deploy/README.md)
|
||||
- [SGLang Deployments](../../examples/backends/sglang/deploy/README.md)
|
||||
- [TensorRT-LLM Deployments](../../examples/backends/trtllm/deploy/README.md)
|
||||
|
||||
3. **Optional:**
|
||||
- [Set up Prometheus & Grafana](./observability/metrics.md)
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ At this point, we should have everything in place to collect and view logs in ou
|
|||
To enable structured logs in a DynamoGraphDeployment, we need to set the `DYN_LOGGING_JSONL` environment variable to `1`. This is done for us in the `agg_logging.yaml` setup for the Sglang backend. We can now deploy the DynamoGraphDeployment with:
|
||||
|
||||
```bash
|
||||
kubectl apply -n $DYN_NAMESPACE -f components/backends/sglang/deploy/agg_logging.yaml
|
||||
kubectl apply -n $DYN_NAMESPACE -f examples/backends/sglang/deploy/agg_logging.yaml
|
||||
```
|
||||
|
||||
Send a few chat completions requests to generate structured logs across the frontend and worker pods across the DynamoGraphDeployment. We are now all set to view the logs in Grafana.
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ Let's start by deploying a simple vLLM aggregated deployment:
|
|||
|
||||
```bash
|
||||
export NAMESPACE=dynamo-system # namespace where dynamo operator is installed
|
||||
pushd components/backends/vllm/deploy
|
||||
pushd examples/backends/vllm/deploy
|
||||
kubectl apply -f agg.yaml -n $NAMESPACE
|
||||
popd
|
||||
```
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ docker compose -f deploy/docker-compose.yml up -d
|
|||
|
||||
### Aggregated Serving with KVBM
|
||||
```bash
|
||||
cd $DYNAMO_HOME/components/backends/vllm
|
||||
cd $DYNAMO_HOME/examples/backends/vllm
|
||||
./launch/agg_kvbm.sh
|
||||
```
|
||||
|
||||
|
|
@ -47,12 +47,12 @@ cd $DYNAMO_HOME/components/backends/vllm
|
|||
```bash
|
||||
# 1P1D - one prefill worker and one decode worker
|
||||
# NOTE: need at least 2 GPUs
|
||||
cd $DYNAMO_HOME/components/backends/vllm
|
||||
cd $DYNAMO_HOME/examples/backends/vllm
|
||||
./launch/disagg_kvbm.sh
|
||||
|
||||
# 2P2D - two prefill workers and two decode workers
|
||||
# NOTE: need at least 4 GPUs
|
||||
cd $DYNAMO_HOME/components/backends/vllm
|
||||
cd $DYNAMO_HOME/examples/backends/vllm
|
||||
./launch/disagg_kvbm_2p2d.sh
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ tokens/s/gpu tokens/s/user
|
|||
```bash
|
||||
# Use with Dynamo's SLA planner (20-30 seconds vs hours)
|
||||
python3 -m benchmarks.profiler.profile_sla \
|
||||
--config ./components/backends/trtllm/deploy/disagg.yaml \
|
||||
--config ./examples/backends/trtllm/deploy/disagg.yaml \
|
||||
--backend trtllm \
|
||||
--use-ai-configurator \
|
||||
--aic-system h200_sxm \
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ For details on hardware configuration and GPU discovery options, see [Hardware C
|
|||
|
||||
#### Using Existing DGD Configs (Recommended for Custom Setups)
|
||||
|
||||
If you have an existing DynamoGraphDeployment config (e.g., from `components/backends/*/deploy/disagg.yaml` or custom recipes), you can reference it via ConfigMap:
|
||||
If you have an existing DynamoGraphDeployment config (e.g., from `examples/backends/*/deploy/disagg.yaml` or custom recipes), you can reference it via ConfigMap:
|
||||
|
||||
**Step 1: Create ConfigMap from your DGD config file:**
|
||||
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ The default delay is 10ms, which produces approximately 100 tokens per second.
|
|||
|
||||
### Other engines, multi-node, production
|
||||
|
||||
`vllm`, `sglang` and `trtllm` production grade engines are available in `components/backends`. They run as Python components, using the Rust bindings. See the main README.
|
||||
`vllm`, `sglang` and `trtllm` production grade engines are available in `examples/backends`. They run as Python components, using the Rust bindings. See the main README.
|
||||
|
||||
`dynamo-run` is an exploration, development and prototyping tool, as well as an example of using the Rust API. Multi-node and production setups should be using the main engine components.
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ The output looks like this:
|
|||
|
||||
## Writing your own engine in Python
|
||||
|
||||
The [dynamo](https://pypi.org/project/ai-dynamo/) Python library allows you to build your own engine and attach it to Dynamo. All of the main backend components in `components/backends/` work like this.
|
||||
The [dynamo](https://pypi.org/project/ai-dynamo/) Python library allows you to build your own engine and attach it to Dynamo. All of the main backend components in `examples/backends/` work like this.
|
||||
|
||||
The Python file must do three things:
|
||||
1. Decorate a function to get the runtime
|
||||
|
|
@ -396,7 +396,7 @@ Here are some example engines:
|
|||
- Chat:
|
||||
* [sglang](https://github.com/ai-dynamo/dynamo/blob/main/lib/bindings/python/examples/hello_world/server_sglang_tok.py)
|
||||
|
||||
More fully-featured Python engines are in `components/backends`.
|
||||
More fully-featured Python engines are in `examples/backends`.
|
||||
|
||||
## Debugging
|
||||
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ spec:
|
|||
- No worker-side configuration changes needed
|
||||
|
||||
**Complete K8s Examples:**
|
||||
- [TRT-LLM aggregated router example](../../components/backends/trtllm/deploy/agg_router.yaml)
|
||||
- [vLLM aggregated router example](../../components/backends/vllm/deploy/agg_router.yaml)
|
||||
- [SGLang aggregated router example](../../components/backends/sglang/deploy/agg_router.yaml)
|
||||
- [TRT-LLM aggregated router example](../../examples/backends/trtllm/deploy/agg_router.yaml)
|
||||
- [vLLM aggregated router example](../../examples/backends/vllm/deploy/agg_router.yaml)
|
||||
- [SGLang aggregated router example](../../examples/backends/sglang/deploy/agg_router.yaml)
|
||||
- [Distributed inference tutorial](../../examples/basics/kubernetes/Distributed_Inference/agg_router.yaml)
|
||||
|
||||
**For A/B Testing and Advanced K8s Setup:**
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ Learn fundamental Dynamo concepts through these introductory examples:
|
|||
|
||||
These examples show how Dynamo broadly works using major inference engines.
|
||||
|
||||
If you want to see advanced, framework-specific deployment patterns and best practices, check out the [Components Workflows](../components/backends/) directory:
|
||||
- **[vLLM](../components/backends/vllm/)** – vLLM-specific deployment and configuration
|
||||
- **[SGLang](../components/backends/sglang/)** – SGLang integration examples and workflows
|
||||
- **[TensorRT-LLM](../components/backends/trtllm/)** – TensorRT-LLM workflows and optimizations
|
||||
If you want to see advanced, framework-specific deployment patterns and best practices, check out the [Examples Backends](../examples/backends/) directory:
|
||||
- **[vLLM](backends/vllm/)** – vLLM-specific deployment and configuration
|
||||
- **[SGLang](backends/sglang/)** – SGLang integration examples and workflows
|
||||
- **[TensorRT-LLM](backends/trtllm/)** – TensorRT-LLM workflows and optimizations
|
||||
|
||||
## Deployment Examples
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ resources:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
args:
|
||||
- "python3"
|
||||
- "-m"
|
||||
|
|
@ -25,7 +25,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -28,7 +28,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -28,7 +28,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -36,7 +36,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -73,7 +73,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -26,7 +26,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -62,7 +62,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -50,7 +50,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
args:
|
||||
|
|
@ -86,7 +86,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/sglang-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/sglang
|
||||
workingDir: /workspace/examples/backends/sglang
|
||||
command:
|
||||
- python3
|
||||
args:
|
||||
|
|
@ -90,7 +90,7 @@ resources:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/trtllm-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/trtllm
|
||||
workingDir: /workspace/examples/backends/trtllm
|
||||
args:
|
||||
- "python3"
|
||||
- "-m"
|
||||
|
|
@ -168,7 +168,7 @@ Then, deploy the model using the deployment file.
|
|||
Export the NAMESPACE you used in your Dynamo Cloud Installation.
|
||||
|
||||
```bash
|
||||
cd dynamo/components/backends/trtllm/deploy
|
||||
cd dynamo/examples/backends/trtllm/deploy
|
||||
export DEPLOYMENT_FILE=agg.yaml
|
||||
kubectl apply -f $DEPLOYMENT_FILE -n $NAMESPACE
|
||||
```
|
||||
|
|
@ -51,7 +51,7 @@ spec:
|
|||
name: nvidia-config
|
||||
mainContainer:
|
||||
image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/trtllm
|
||||
workingDir: /workspace/examples/backends/trtllm
|
||||
# mount the configmap as a volume
|
||||
volumeMounts:
|
||||
- name: nvidia-config
|
||||
|
|
@ -96,7 +96,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/trtllm-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/trtllm
|
||||
workingDir: /workspace/examples/backends/trtllm
|
||||
command:
|
||||
- python3
|
||||
- -m
|
||||
|
|
@ -17,7 +17,7 @@ spec:
|
|||
extraPodSpec:
|
||||
mainContainer:
|
||||
image: my-registry/trtllm-runtime:my-tag
|
||||
workingDir: /workspace/components/backends/trtllm
|
||||
workingDir: /workspace/examples/backends/trtllm
|
||||
command:
|
||||
- python3
|
||||
args:
|
||||
|
|
@ -49,7 +49,7 @@ For more finer grained details on how to launch TRTLLM backend workers with Deep
|
|||
|
||||
Before running the scripts, ensure you have:
|
||||
1. Access to a SLURM cluster
|
||||
2. Container image of Dynamo with TensorRT-LLM built using instructions from [here](https://github.com/ai-dynamo/dynamo/tree/main/components/backends/trtllm#build-docker).
|
||||
2. Container image of Dynamo with TensorRT-LLM built using instructions from [here](https://github.com/ai-dynamo/dynamo/tree/main/docs/backends/trtllm/README.md#build-container).
|
||||
3. Model files accessible on the cluster
|
||||
4. Required environment variables set
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ export SLURM_JOB_NAME=""
|
|||
|
||||
# NOTE: IMAGE must be set manually for now
|
||||
# To build an iamge, see the steps here:
|
||||
# https://github.com/ai-dynamo/dynamo/tree/main/components/backends/trtllm#build-docker
|
||||
# https://github.com/ai-dynamo/dynamo/tree/main/docs/backends/trtllm/README.md#build-container
|
||||
export IMAGE="<dynamo_trtllm_image>"
|
||||
|
||||
# NOTE: In general, Deepseek R1 is very large, so it is recommended to
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue