Commit Graph

52 Commits

Author SHA1 Message Date
Dan Aloni b2aa504b47
fix: upgrade axum to 0.8 and etcd-client to 0.16 (#2317)
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
2025-08-06 18:25:49 +00:00
Anant Sharma 625578c3bb
chore: update nixl version to 0.4.1 (#2221) 2025-07-31 17:46:21 -04:00
Dmitry Tokarev 4c90b1b924
chore: Version bump to 0.4.0 (#2179) 2025-07-30 02:07:31 +00:00
Paul Hendricks 66b7d2c75d
fix: updates versions and adds ahashmap to BPE (#2072) 2025-07-23 20:27:18 +00:00
Graham King 182d3b5dc7
chore(bindings): Remove mistralrs / llama.cpp (#1970) 2025-07-16 16:12:40 -04:00
Graham King aba60996f2
perf(router): Remove lock from router hot path (#1963) 2025-07-16 12:26:32 -04:00
Anant Sharma d975761b8b
chore: update nixl to 0.4.0 release (#1860) (#1886) 2025-07-11 12:45:44 -04:00
Tushar Sharma 1704b126f3
build: Revert "chore: update nixl to 0.4.0 release" (#1880) 2025-07-10 23:30:28 +00:00
Anant Sharma 5fa4cddab9
chore: update nixl to 0.4.0 release (#1860) 2025-07-10 17:08:34 -04:00
ZichengMa ece76a6201
feat: Build DistributedRuntime-level HTTP server with /health /metrics (#1656) 2025-07-08 22:49:28 +00:00
Graham King 2bf27924a1
feat(python): Python bindings for the Dynamo CLI tools (#1799) 2025-07-08 21:40:36 +00:00
Anant Sharma c4935b3497
chore: update versions for 0.3.2 release (#1793) 2025-07-07 17:21:02 -04:00
Anant Sharma a9241b61f0
chore: update nixl to latest 0.3.1 commit (#1762) 2025-07-03 15:31:47 -07:00
Graham King 4ab476174a
chore(engines): Upgrade mistralrs to 0.6.0 (#1767) 2025-07-03 12:45:58 -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
Paul Hendricks 82eae1fdf5
refactor: Upgrade async-openai (#1693) 2025-06-30 13:35:10 -04:00
jthomson04 250ed7334b
fix: Fix NIXL 0.3.1 build (#1561) 2025-06-17 14:30:10 -07: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
Anant Sharma 99e67e607a
chore: update dynamo and nixl versions for 0.3.1 (#1517) 2025-06-13 21:13:43 +00:00
Anant Sharma 9d9a1d9b74
chore: update dynamo and nixl versions for 0.3.0 (#1240) 2025-05-29 17:30:17 +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
Ryan Olson 31ff23704b
feat: adding arena allocator for storage objects (#1178) 2025-05-23 08:41:42 -06:00
jthomson04 74221fd716
feat: Add support for SSD offloading in block manager (#1115) 2025-05-19 15:35:00 -07:00
Jacky 437cae0ad0
feat: KV Block Manager Python bindings (#1022) 2025-05-19 12:33:41 -04:00
Ryan Olson 4564a38711
feat: kv block manager (#965) 2025-05-09 21:05:24 +00:00
Harrison Saturley-Hall e9cb035ac7
chore: bump versions and NIXL dependencies for 0.2.1 (#1012) 2025-05-09 15:35:01 +00:00
wxsm b2e401bcae
feat: allow adding auth to etcd (#980)
Allow both password or TLS auth, if none of these is provided fallback to no auth

Closes #657
2025-05-09 08:36:41 -04:00
Graham King ceaeba3e38
feat: Qwen3, Gemma3 and Llama4 support (#1002)
. New mistralrs and llamacpp version
. mistralrs: Handle Gemma 3 and Llama 4 as vision models
. Update the dynamo-run docs to use Qwen 3
. Our pre-processor now supports Llama 4's newer multi-modal `config.json`
. Upgrade minijinja to handle Qwen 3's prompt template

For Llama 4 we'll need to limit the max seq len. vllm says:
> To serve at least one request with the models's max seq len (10485760), (240.00 GiB KV cache is needed,...

I was able to run Llama 4 with llamacpp and a quantized GGUF, with Dynamo doing the pre-processing.
2025-05-08 18:18:40 -04: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
Graham King 2d2a102727
chore(dynamo-llm): Move the pre-processor to ingress side (#903)
Part of https://github.com/ai-dynamo/dynamo/issues/743
2025-05-01 19:55:10 +00: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
Harrison Saturley-Hall 0715d4691f
chore: bump NIXL version and package versions (#836)
Signed-off-by: Harrison Saturley-Hall <454891+saturley-hall@users.noreply.github.com>
2025-04-25 19:24:38 -04:00
Graham King d346782c7c
chore: Publish Model Deployment Card to NATS (#799)
This will allow an ingress-side pre-processor to see it without needing a model checkout.

Currently pre-processing is done in the worker, which has access to the model deployment card ("MDC") files (`config.json`, `tokenizer.json` and `tokenizer_config.json`) locally. We want to move the pre-processor to the ingress side to support KV routing. That requires ingress side (i.e the HTTP server), on a different machine than the worker to be able to see those three files.

To support that this PR makes the worker upload the contents of those files to the NATS object store, and publishes the MDC with those NATS urls to the key-value store. 

The key-value store has an interface so any store (nats, etcd, redis, etc) can be supported. Implementations for memory and NATS are provided.

Fetching the MDC from the store, doing pre-processing ingress side, and publishing a card backed by a GGUF, are all for a later commit.

Part of #743
2025-04-25 08:52:59 -04:00
Anant Sharma fa7ee14c2a chore: update versions to 0.1.1 (#552) 2025-04-09 09:50:30 -04:00
Ryan Olson 84985d3f1d refactor: migrate engines to standalone crates (#453)
Moved all of `lib/llm/src/engines` to their own crates as e.g. `lib/engines/mistralrs`. This will allow publishing of the `dynamo-llm` crate as it won't have any github dependencies.

The only engines in dynamo-llm will be the demo `echo` ones.

Co-authored-by: Graham King <grahamk@nvidia.com>
2025-04-03 21:53:54 +00:00
Ryan Olson de2905377c refactor: prometheus upgrade (#452) 2025-03-31 13:03:36 -06:00
Graham King c7067fc2ec feat: Build pre-processor from GGUF (#344)
This lets us do:
```
dynamo-run out=llamacpp <gguf_file>
```

Previously a `--model-config <hf-repo>` was also required, to configure our tokenizer.
2025-03-24 11:59:41 -04:00
Graham King 7c3fd5c94c chore: Don't depend on openssl (#292)
This makes the Rust parts all use ring / rustls library instead of local install of openssl. It's a step on the journey to being statically linked.

Pieces:
- `tokenizers` and `mistralrs` now support rustls (mistralrs by default, tokenizers with feature flag).
- Move shared dependencies up into workspace
- New `rand` crate has some renames for future rust
- Ensure the dependency doesn't creep back in by enforcing it with cargo deny.
2025-03-19 14:16:19 -04:00
Ryan Olson f04359cf69 feat: global kv block manager (#45) 2025-03-13 20:57:28 -06:00
Anant Sharma 3d2928510c build: add top level rust workspace (#137) 2025-03-13 17:22:19 -04:00
Anant Sharma fc4da34502 chore: update wheel name and reset versions (#73) 2025-03-10 17:41:13 -04:00
Neelay Shah 602352ce19 chore: rename dynamo (#44)
Co-authored-by: Biswa Panda <biswa.panda@gmail.com>
2025-03-08 01:42:40 -08:00
Graham King 12714d9080 feat: Python bring-your-own-engine with our tokenizer (#47)
Instead of using `out=pystr:<my.py>` we can now do this:
```
dynemo-run out=pytok:/home/graham/my_python_engine.py --model-path <hf-repo-checkout>
```

That engine will receive and respond with tokens. Here's an example engine file:
```
import asyncio

async def generate(request):
    yield {"token_ids":[791]}
    await asyncio.sleep(0.1)
    yield {"token_ids":[6864]}
    await asyncio.sleep(0.1)
    yield {"token_ids":[315]}
    await asyncio.sleep(0.1)
    yield {"token_ids":[9822]}
    await asyncio.sleep(0.1)
    yield {"token_ids":[374]}
    await asyncio.sleep(0.1)
    yield {"token_ids":[12366]}
    await asyncio.sleep(0.1)
    yield {"token_ids":[13]}
```

Also reduce duplication by making the bindings engine use the llm lib engine.
2025-03-07 10:48:37 -05:00
Neelay Shah 1af7433bff refactor: rename triton_distributed to dynemo (#22)
Co-authored-by: Graham King <grahamk@nvidia.com>
2025-03-05 09:15:46 -08:00
Graham King 057f8f4700 feat: TensorRT-LLM engine (#317)
Engine, `tio` support and docs.

Proof of concept / experimental.
2025-02-28 17:09:01 -05:00
Anant Sharma ea401e3bc0 ci: build wheel from root directory (#274) 2025-02-27 11:56:51 -05:00
Paul Hendricks 86aff237ab refactor: using async_openai
Co-authored-by: Graham King <grahamk@nvidia.com>
2025-02-26 13:59:39 -08:00
Graham King e97493eb00 feat: sglang backend for tio (#271)
- Setup venv

```
uv venv
source .venv/bin/activate
uv pip install pip
uv pip install sgl-kernel --force-reinstall --no-deps
uv pip install "sglang[all]==0.4.2" --find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/
```

- Build: `cargo build --release --features sglang`

- Run single node (make sure you're in the venv): `./tio out=sglang ~/llm_models/my_model`

- Run Deepseek multi-gpu / multi-node:

Node 1:
```
tio in=http out=sglang --model-path ~/llm_models/DeepSeek-R1-Distill-Llama-70B/ --tensor-parallel-size 8 --num-nodes 2 --node-rank 0 --dist-init-addr 10.217.98.122:9876
```

Node 2:
```
tio in=none out=sglang --model-path ~/llm_models/DeepSeek-R1-Distill-Llama-70B/ --tensor-parallel-size 8 --num-nodes 2 --node-rank 1 --dist-init-addr 10.217.98.122:9876
```
2025-02-25 17:04:08 -05:00
Alec b760c5694d feat: Add completion endpoint to http server and llmctl (#230)
Co-authored-by: aflowers <aflowers@nvidia.com>
2025-02-25 12:32:09 -08:00