Commit Graph

74 Commits

Author SHA1 Message Date
Keiven C acbdabc464
feat(metrics): add NATS client metrics to prometheus_metrics_fmt (#2292)
Co-authored-by: Keiven Chang <keivenchang@users.noreply.github.com>
2025-08-14 19:33:53 -07:00
Tzu-Ling Kan 3a3f5bf275
feat: Add a "model" label to Component metrics (#2389) 2025-08-14 13:48:25 -05:00
Jorge António d0a6363584
feat: add RuntimeConfig to ModelEntry (#2311)
Co-authored-by: Yan Ru Pei <yanrpei@gmail.com>
2025-08-14 10:19:53 -07:00
Graham King 72ec5f5c7b
feat: Allow an endpoint to serve multiple models (#2418) 2025-08-13 10:48:42 -04:00
Yan Ru Pei 5166a3dd44
feat: Router replicas with state-sharing (#2264) 2025-08-07 22:57:57 +00:00
Graham King 1954fcfa09
chore: Remove service_name from ModelDeploymentCard (#2349) 2025-08-07 11:02:41 -04:00
Graham King 6a1a801c2d
feat: Support static workers, run without etcd. (#2281) 2025-08-06 09:51:43 -04:00
Hongkuan Zhou 36c4ef5eb2
feat: migrate requests when planner shutdown decode engine (vllm) (#2280)
Signed-off-by: Hongkuan Zhou <tedzhouhk@gmail.com>
Co-authored-by: Jacky <18255193+kthui@users.noreply.github.com>
Co-authored-by: hhzhang16 <54051230+hhzhang16@users.noreply.github.com>
2025-08-05 12:24:07 -07:00
Jacky 347620a1ff
feat: Allow Python Engine to end stream before final (#2270) 2025-08-05 10:44:18 -07:00
Chi 433f60121a
feat: Pass user_data to register_llm for LoRA support (#2286) 2025-08-05 10:16:43 -04:00
Yan Ru Pei bae25dc6d4
feat: skip downloading model weights if using mocker (only tokenizer) (#2213) 2025-07-31 18:15:57 +00:00
Jacky 1f07dab7bd
feat: Add migration to LLM requests (#1930) 2025-07-18 20:04:20 +00:00
Graham King fc12436048
feat(frontend): router-mode settings (#2001) 2025-07-18 18:52:57 +00:00
Graham King 182d3b5dc7
chore(bindings): Remove mistralrs / llama.cpp (#1970) 2025-07-16 16:12:40 -04:00
Yan Ru Pei f31732a22d
feat: integrate mocker with dynamo-run and python cli (#1927) 2025-07-16 18:22:15 +00:00
Graham King 2bf27924a1
feat(python): Python bindings for the Dynamo CLI tools (#1799) 2025-07-08 21:40:36 +00:00
Yan Ru Pei 84e71e27d3
feat: predictive active blocks for routing without load metrics (#1731)
Signed-off-by: Yan Ru Pei <yanrpei@gmail.com>
Co-authored-by: Alec <35311602+alec-flowers@users.noreply.github.com>
2025-07-08 00:18:22 -07:00
jain-ria 439e977d9c
feat: vllm speculative decoding metrics (#1549)
Signed-off-by: jain-ria <riajain@NVIDIA.com>
Co-authored-by: Alec <35311602+alec-flowers@users.noreply.github.com>
2025-07-07 23:40:43 +00:00
Jacky b4ddca99a0
feat: Failure Detection while Responses are returning (#1671) 2025-07-07 14:00:17 -07:00
Alec 0a32b3443f
fix: default to None initialization of routing config (#1713) 2025-07-01 10:55:05 -07:00
jthomson04 6365a015b3
fix: Fix main (#1712) 2025-06-30 22:08:06 -07:00
jthomson04 aaf283bbb8
feat: Approximate KV Routing (#1636) 2025-06-30 20:34:08 -07:00
Graham King 92f06b0e7f
chore(dynamo-run): Refactor to library (#1687)
Move much of what was in the `dynamo-run` crate into `dynamo-llm` so that everyone can use it.

Example usage:

1. Create a `LocalModel`:

```
    let local_model = LocalModelBuilder::default()
	.model_path("Qwen/Qwen3-0.6B")
	.http_port(8080)
	.build().await?;
```

2. Make an engine:

```
    let engine_config = EngineConfig::StaticFull {
	engine: dynamo_engine_mistralrs::make_engine(&local_model).await?,
	model: Box::new(local_model),
    };
```

3. Connect it to an input and run it

```
    dynamo_llm::entrypoint::input::run_input(Input::Http, runtime, engine_config).await?;
```

For https://github.com/ai-dynamo/dynamo/issues/1647

Code Rabbit summary, thanks:
  * Introduced a flexible builder pattern for local model configuration, allowing advanced customization and easier initialization.
  * Added new input modes and unified input handling, supporting interactive chat, HTTP server, batch file, and distributed endpoint modes.
  * Centralized engine configuration and routing, enabling more extensible and maintainable engine management.
  * Simplified and modularized the codebase by moving input and engine logic into dedicated modules.
  * Replaced direct model construction with an asynchronous builder for improved clarity and extensibility.
  * Streamlined configuration and validation for flags and router settings.
  * Added validation to prevent incompatible input and output combinations in endpoint and dynamic modes.
2025-06-30 21:06:24 +00:00
Yan Ru Pei 8392e7a190
feat: Unnormalize waiting requests + predictive load updates for Python router (mirroring Rust) + softmax sampling to reduce thrashing (#1638) 2025-06-27 09:01:59 +00:00
Yan Ru Pei 13a99b7f76
feat: Standalone Router (#1409)
Signed-off-by: PeaBrane <yanrpei@gmail.com>
Signed-off-by: Yan Ru Pei <yanrpei@gmail.com>
Signed-off-by: jain-ria <riajain@NVIDIA.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: jain-ria <riajain@NVIDIA.com>
2025-06-14 19:02:31 +00:00
Graham King 3f6a74723f
chore: Remove PreprocessedRequest alias BackendInput (#1307)
It was confusing to have two names for one type.

This tidy up started in #1064 , is now complete.
2025-06-02 11:22:27 -04:00
Alec 2f8da9ad1d
refactor: rename KvMetricsPublisher to WorkerMetricsPublisher (#1284) 2025-05-30 17:23:32 +00:00
jthomson04 9210a26d90
refactor: Refactor kv event publishers (#1287) 2025-05-30 09:04:28 -07:00
Alec f67dc38b28
fix: Renamed event publisher classes and configuration (#1273) 2025-05-29 13:00:06 -07:00
Jacky 7677f74f37
feat: KVBM async Python bindings and Layer class (#1141) 2025-05-29 17:49:05 +00:00
Alec 0df6d462d7
feat: add KV Event Publishing to vLLM v1 (#1181) 2025-05-29 07:56:49 -07:00
Graham King 0a1d1fbe3d
feat(dynamo-llm): Remove bring-your-own-engine (#1216)
It was removed from the docs in 0.2.1 and replaced with writing a [standalone Python engine](https://github.com/ai-dynamo/dynamo/blob/main/docs/guides/dynamo_run.md#writing-your-own-engine-in-python).

Also remove the associated `dynamo-run` feature `python`.

Releasing this in 0.3.0 will resolve #784 and #1109.
2025-05-28 18:52:27 +00:00
Graham King 183f2b3286
feat(dynamo-run): Allow setting KV cache block size (#1175)
Example:
```
dynamo-run out=<engine> <model> --kv-cache-block-size 64
```

In a distributed system this goes on the worker node and is propagated to ingress via the model deployment card.

Previously hard coded to 16, which is now the default.

- Load context_length from model. Closes #1172
- Store context length and KV cache block size in Model Deployment Card #1170
2025-05-22 14:55:36 -07:00
Graham King 3e8e38a942
fix(llmctl): Use ModelWatcher instead of direct etcd operations (#1150) 2025-05-21 19:06:56 +00:00
Ryan Olson 80256acf15
feat: adding outer dimension to isolate k/v blocks (#1126) 2025-05-20 08:51:41 -04:00
Graham King aeb79e6277
feat: Support multiple models on single ingress node (#1127)
We can now do this:

- Node 1:

```
dynamo-run in=http out=dyn
```

- Node 2 and 3, two instances of component 'backend' in the nemotron_ultra pipeline:

```
dynamo-run in=dyn://nemotron_ultra.backend.generate out=vllm /data/models/NemotronUltra
```

- Node 4 and 5, two instances of the 'backend' component in nemotron_super pipeline:

```
dynamo-run in=dyn://nemotron_super.backend.generate out=vllm /data/models/NemotronSuper
```

The ingress node will discover all four instances and route correctly. We have been planning for this for a long time now.

As part of this auto-discovery is now always `out=dyn`, with no extra URL parts. Previously it could only route to a single pipeline.

Also:
- Refactor endpoint / instance naming now that I understand them
- Fix removing models when their instance stops.
2025-05-19 18:41:07 -04:00
Jacky 437cae0ad0
feat: KV Block Manager Python bindings (#1022) 2025-05-19 12:33:41 -04:00
Tom O'Brien 73fdfb8ab8
feat: Add OpenAI Embeddings interface in rust lib (#1110)
Implements OpenAI embeddings (interface only).

- Adds ModelType::Embedding
- Adds OpenAI embedding request/response structs
- Adds support for embedding model discovery
2025-05-19 11:59:46 -04:00
Graham King 2981350880
feat(dynamo-run): KV-aware routing (#1064)
Router:
```
dynamo-run in=http out=dyn://dynamo.endpoint.generate --router-mode kv
```

Worker (* N):
```
dynamo-run in=dyn://dynamo.endpoint.generate out=vllm /data/llms/Qwen/Qwen3-4B
```

You need patched vllm and the C bindings `.so`. Full docs in the updated guide: `docs/guides/dynamo_run.md`.

This gives us a pure-Rust ingress node: OpenAI compliant HTTP server + Pre-processor + KV-aware router.
2025-05-14 15:21:46 -04:00
Hongkuan Zhou 466b8e5fb7
refactor: use primary lease + self-contained graceful shutdown trigged by SIGINT/SIGTERM (#1001) 2025-05-08 16:53:39 -07:00
Hongkuan Zhou a590d10317
feat: cleanup EtcdKvCache and PrefillQueue before and after launch (#925) 2025-05-07 16:35:55 -07:00
Graham King 92bbbc3923
fix: Fix vllm/sglang engine model name if using HF repo (#986)
Signed-off-by: Graham King <graham@gkgk.org>
Co-authored-by: Ryan McCormick <rmccormick@nvidia.com>
2025-05-07 23:20:51 +00:00
jthomson04 c4213899fe
feat: Migrate NATS Queue to Rust (#669) (#961) 2025-05-06 15:36:55 -07:00
Graham King 99cd9d85a9
feat: dynamo-run <-> python interop (#934)
Adding this to a Python script makes it register on the network so that `dynamo-run` can discover it and send it requests:
```
from dynamo.llm import register_llm

MODEL = "Qwen/Qwen2.5-0.5B-Instruct"
await register_llm(endpoint, MODEL, 3)
```

Full vllm example, with pre-processing in dynamo:
- `dynamo-run in=text out=dyn://dynamo.backend.generate`
- `cd lib/bindings/python/examples/hello_world`
- `python server_vllm.py`

This builds on top of the work to move pre-processor to ingress side. It means we can decouple Rust and Python using NATS as the bus.

The `register_llm` call does this:

- Download the model from HF if necessary
- Load the model deployment card from the HF folder or extract from GGUF
- Push the tokenizer config etc into NATS object store so ingress can access it from a different machine
- Publish the model deployment card to ETCD
2025-05-05 20:49:19 -04:00
Hongkuan Zhou 9d643f1eed
fix: use primary lease for NixlMetadataStore (#928) 2025-05-05 08:38:52 -07:00
Graham King a1a10365a7
chore: Split PushRouter from Client (#817)
In a distributed system we don't know if the remote workers need pre-processing done ingress-side or not. Previously Client required us to decide this before discovering the remote endpoints, which was fine because pre-processing was worker-side.

As part of moving pre-processing back to ingress-side we need to split this into two steps:
- Client discovers the endpoints, and (later PR) will fetch their Model Deployment Card.
- PushRouter will use the Model Deployment Card to decide if they need pre-processing or not, which affects the types of the generic parameters.

Part of #743
2025-04-29 14:39:56 +00:00
Hongkuan Zhou 7d5d6f8c08
feat: local planner for 0.2.0 release (#398)
Signed-off-by: Hongkuan Zhou <tedzhouhk@gmail.com>
Co-authored-by: ishandhanani <82981111+ishandhanani@users.noreply.github.com>
Co-authored-by: ishandhanani <ishandhanani@gmail.com>
Co-authored-by: Ubuntu <ubuntu@dev-inst-2w1vokvyuts83rzn4n1k7mnzew9.us-central1-a.c.brevdevprod.internal>
Co-authored-by: Biswa Panda <biswa.panda@gmail.com>
Co-authored-by: Anant Sharma <anants@nvidia.com>
2025-04-26 00:05:54 +00:00
Pankaj Gupta 420b7a82be
fix: Fix cancellation flow in python component graph (#765) 2025-04-21 16:07:49 -04:00
ishandhanani c392c3419b
feat: add custom lease to worker components (#748) 2025-04-21 17:43:02 +00:00
Hongkuan Zhou 4c38680eac
feat: gracefully shutdown endpoint by revoking etcd lease + python binding (#730)
Co-authored-by: ishandhanani <82981111+ishandhanani@users.noreply.github.com>
2025-04-18 18:36:50 +00:00