"...vscode:/vscode.git/clone" did not exist on "6a31be8f76da915bc20fdf8d1de4d31f9e93faf8"
README.md 4.36 KB
Newer Older
Neelay Shah's avatar
Neelay Shah committed
1
<!--
Neelay Shah's avatar
Neelay Shah committed
2
SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Neelay Shah's avatar
Neelay Shah committed
3
SPDX-License-Identifier: Apache-2.0
4
5
6
7
8
9
10
11
12
13
14
15

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Neelay Shah's avatar
Neelay Shah committed
16
17
-->

Meenakshi Sharma's avatar
Meenakshi Sharma committed
18
19
20
21
22
23
<h1 style="display: inline;">NVIDIA Dynamo</h1>
<span style="float: right;">
  <a href="https://discord.gg/D92uqZRjCZ">
    <img src="https://dcbadge.limes.pink/api/server/D92uqZRjCZ" alt="Discord">
  </a>
</span>
Neelay Shah's avatar
Neelay Shah committed
24

25
26
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub Release](https://img.shields.io/github/v/release/ai-dynamo/dynamo)](https://github.com/ai-dynamo/dynamo/releases/latest)
Meenakshi Sharma's avatar
Meenakshi Sharma committed
27

Neelay Shah's avatar
Neelay Shah committed
28
| **[Guides](docs/guides)** | **[Architecture and Features](docs/architecture.md)** | **[APIs](lib/bindings/python/README.md)** | **[SDK](deploy/dynamo/sdk/README.md)** |
Neelay Shah's avatar
Neelay Shah committed
29

Neelay Shah's avatar
Neelay Shah committed
30
NVIDIA Dynamo is a high-throughput low-latency inference framework designed for serving generative AI and reasoning models in multi-node distributed environments. Dynamo is designed to be inference engine agnostic (supports TRT-LLM, vLLM, SGLang or others) and captures LLM-specific capabilities such as:
31

Neelay Shah's avatar
Neelay Shah committed
32
33
34
35
36
- **Disaggregated prefill & decode inference** – Maximizes GPU throughput and facilitates trade off between throughput and latency.
- **Dynamic GPU scheduling** – Optimizes performance based on fluctuating demand
- **LLM-aware request routing** – Eliminates unnecessary KV cache re-computation
- **Accelerated data transfer** – Reduces inference response time using NIXL.
- **KV cache offloading** – Leverages multiple memory hierarchies for higher system throughput
37

Neelay Shah's avatar
Neelay Shah committed
38
Built in Rust for performance and in Python for extensibility, Dynamo is fully open-source and driven by a transparent, OSS (Open Source Software) first development approach.
Neelay Shah's avatar
Neelay Shah committed
39

Neelay Shah's avatar
Neelay Shah committed
40
### Installation
41

Neelay Shah's avatar
Neelay Shah committed
42
The following examples require a few system level packages.
43

Neelay Shah's avatar
Neelay Shah committed
44
45
46
```
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -yq python3-dev libucx0
47

Neelay Shah's avatar
Neelay Shah committed
48
49
pip install ai-dynamo nixl vllm==0.7.2+dynamo
```
50

Neelay Shah's avatar
Neelay Shah committed
51
52
> [!NOTE]
> TensorRT-LLM Support is currently available on a [branch](https://github.com/ai-dynamo/dynamo/tree/dynamo/trtllm_llmapi_v1/examples/trtllm#building-the-environment)
53

Neelay Shah's avatar
Neelay Shah committed
54
### Running and Interacting with an LLM Locally
55

Neelay Shah's avatar
Neelay Shah committed
56
57
58
To run a model and interact with it locally you can call `dynamo
run` with a hugging face model. `dynamo run` supports several backends
including: `mistralrs`, `sglang`, `vllm`, and `tensorrtllm`.
59

Neelay Shah's avatar
Neelay Shah committed
60
#### Example Command
61

Neelay Shah's avatar
Neelay Shah committed
62
63
```
dynamo run out=vllm deepseek-ai/DeepSeek-R1-Distill-Llama-8B
64
```
65

Neelay Shah's avatar
Neelay Shah committed
66
67
68
69
70
```
? User › Hello, how are you?
✔ User · Hello, how are you?
Okay, so I'm trying to figure out how to respond to the user's greeting. They said, "Hello, how are you?" and then followed it with "Hello! I'm just a program, but thanks for asking." Hmm, I need to come up with a suitable reply. ...
```
71

Neelay Shah's avatar
Neelay Shah committed
72
### LLM Serving
73

Neelay Shah's avatar
Neelay Shah committed
74
75
Dynamo provides a simple way to spin up a local set of inference
components including:
76

Neelay Shah's avatar
Neelay Shah committed
77
78
79
- **OpenAI Compatible Frontend** – High performance OpenAI compatible http api server written in Rust.
- **Basic and Kv Aware Router** – Route and load balance traffic to a set of workers.
- **Workers** – Set of pre-configured LLM serving engines.
80

Neelay Shah's avatar
Neelay Shah committed
81
82
To run a minimal configuration you can use a pre-configured
example.
83

Neelay Shah's avatar
Neelay Shah committed
84
#### Start Dynamo Distributed Runtime Services
85

Neelay Shah's avatar
Neelay Shah committed
86
First start the Dynamo Distributed Runtime services:
87
88

```bash
Neelay Shah's avatar
Neelay Shah committed
89
docker compose -f deploy/docker-compose.yml up -d
90
```
91

Neelay Shah's avatar
Neelay Shah committed
92
93
94
95
#### Start Dynamo LLM Serving Components

Next serve a minimal configuration with an http server, basic
round-robin router, and a single worker.
96
97

```bash
Neelay Shah's avatar
Neelay Shah committed
98
99
cd examples/llm
dynamo serve graphs.agg:Frontend -f configs/agg.yaml
100
101
```

Neelay Shah's avatar
Neelay Shah committed
102
#### Send a Request
103

104
```bash
Neelay Shah's avatar
Neelay Shah committed
105
106
107
108
109
110
111
112
113
114
115
curl localhost:8000/v1/chat/completions   -H "Content-Type: application/json"   -d '{
    "model": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
    "messages": [
    {
        "role": "user",
        "content": "Hello, how are you?"
    }
    ],
    "stream":false,
    "max_tokens": 300
  }' | jq
116
117
```