-
Notifications
You must be signed in to change notification settings - Fork 751
feat(dynamo-run): Default to building with CUDA #1295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ This guide explains the`dynamo run` command. | |
|
|
||
| `dynamo-run` is a CLI tool for exploring the Dynamo components. It's also an example of how to use components from Rust. If you use the Python wheel, it's available as `dynamo run` . | ||
|
|
||
| It supports these engines: mistralrs, llamacpp, sglang, vllm, and tensorrt-llm. `mistralrs` is the default. | ||
| It supports these engines: mistralrs, llamacpp, sglang, vllm, and tensorrt-llm. | ||
|
|
||
| Usage: | ||
| ``` | ||
|
|
@@ -35,12 +35,16 @@ Example: `dynamo run Qwen/Qwen3-0.6B` | |
|
|
||
| Set the environment variable `DYN_LOG` to adjust the logging level; for example, `export DYN_LOG=debug`. It has the same syntax as `RUST_LOG`. | ||
|
|
||
| `dynamo-run` is build for CUDA by default. For other builds (CPU, Metal, etc) see the [Setup section](#setup). | ||
|
|
||
| ## Quickstart with pip and vllm | ||
|
|
||
| If you used `pip` to install `dynamo`, you have the `dynamo-run` binary pre-installed with the `vllm` engine. You must be in a virtual environment with vllm installed to use this engine. To compile from source, see [Full usage details](#full-usage-details) below. | ||
|
|
||
| The vllm and sglang engines require [etcd](https://etcd.io/) and [nats](https://nats.io/) with jetstream (`nats-server -js`). Mistralrs and llamacpp do not. | ||
|
|
||
| The default engine for safetensors is `mistral.rs`. The default model for GGUF is `llama.cpp`. | ||
|
|
||
| ### Use model from Hugging Face | ||
|
|
||
| To automatically downloads Qwen3 4B from Hugging Face (16 GiB download) and starts it in interactive text mode: | ||
|
|
@@ -252,19 +256,30 @@ source $HOME/.cargo/env | |
|
|
||
| ##### Step 3: Build | ||
|
|
||
| - Linux with GPU and CUDA (tested on Ubuntu): | ||
| - Linux with GPU and CUDA (tested on Ubuntu). This is the default. | ||
| ``` | ||
| cargo build --features cuda | ||
| cargo build | ||
| ``` | ||
|
|
||
| which is equivalent to | ||
|
|
||
| ``` | ||
| cargo build --features cuda,mistralrs,llamacpp | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. awesome! |
||
| ``` | ||
|
|
||
| - macOS with Metal: | ||
| ``` | ||
| cargo build --features metal | ||
| cargo build --no-default-features --features metal,mistralrs,llamacpp | ||
| ``` | ||
|
|
||
| - Vulkan (llama.cpp engine only), untested | ||
| ``` | ||
| cargo build --no-default-features --features vulkan,mistralrs,llamacpp | ||
| ``` | ||
|
|
||
| - CPU only: | ||
| ``` | ||
| cargo build | ||
| cargo build --no-default-features --features mistralrs,llamacpp | ||
| ``` | ||
|
|
||
| Optionally you can run `cargo build` from any location with arguments: | ||
|
|
||
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: the build will support CPU as well as CUDA - right? maybe dynamo is built with
CPUandGPUsupport by default ...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we have to decide that at build time. We could (probably should) release two versions, one for CPU and CUDA.
It would be valuable to investigate doing a multi-build that can support either, and detect at runtime. Need engineering time there though, so many other priorities.