One line to the binary. Three to your first token.
No GPU required to start — the profiler and the CPU path run on any machine. Copy, paste, run.
curl -fsSL https://raw.githubusercontent.com/vedantnimbarte/dlm/main/install.sh | shRust users can also cargo install --git https://github.com/vedantnimbarte/dlm to build from source.
$ ▋
From nothing to a running server.
Three commands. Each one is copy-paste, and each states what it does under the hood.
Install the binary
One line downloads a prebuilt binary for your platform — Linux x86-64/arm64, macOS Apple Silicon, or Windows x86-64. No clone, no Rust toolchain, no build. Every download is checksum-verified against a published .sha256 before it is unpacked or run.
curl -fsSL https://raw.githubusercontent.com/vedantnimbarte/dlm/main/install.sh | shLinux/macOS installs into ~/.local/bin. On Windows, run irm https://raw.githubusercontent.com/vedantnimbarte/dlm/main/install.ps1 | iex — it installs into %LOCALAPPDATA%\Programs\dlm and adds it to PATH. On x86-64 Linux or Windows with an NVIDIA GPU the installer picks the CUDA build and runs on the GPU by default. Everywhere else — no NVIDIA GPU, arm64, macOS — it installs the portable CPU build; an AMD GPU gets the CPU build too. Set DLM_CPU=1 to force CPU; DLM_INSTALL_DIR to change the location.
Find and pull a model
Search the Hugging Face hub and download a checkpoint straight to disk — no hf CLI, no manual file-grabbing. Safetensors and GGUF checkpoints load; PyTorch-only repos don't.
dlm pull Qwen/Qwen2.5-0.5B-Instructdlm search llama-3.2 lists the most-downloaded matches first. pull fetches only the files dlm loads (config.json, *.safetensors, tokenizer) into ./models. Use --token or $HF_TOKEN for gated repos.
Serve it
Start the OpenAI-compatible HTTP server. Existing clients — Open WebUI, the OpenAI SDKs — point at dlm with a URL change and talk to it unchanged.
dlm serve --model-path ./models/Qwen2.5-0.5B-Instruct --port 8000Exposes the OpenAI POST /v1/chat/completions and Anthropic POST /v1/messages endpoints, plus GET /v1/models. Add "stream": true for token-by-token SSE. Concurrent requests are continuously batched.
See the plan before you commit.
dlm profile does the VRAM budget math and tells you exactly what will stay resident — no weights loaded, no GPU required.
$ dlm profile
gpu backend : none (host fallback)
model source : built-in Llama-3-70B-class sample
geometry : 80 layers, hidden 8192, 64 q / 8 kv heads
quantization : Int4 (0.5 bytes/param), ~70.6 B params
── VRAM PLAN ──────────────────────────────
M_free : 16384.0 MiB
M_safety : 1536.0 MiB
M_kv_total : 2560.0 MiB
M_layer_weight : 420.5 MiB
▶ layers_to_load : 29 / 80
▶ resident : 36.2%
────────────────────────────────────────────
swap cycle : 3 streaming pass(es), window of 29 layer(s)
pipeline : 4 steps, 2 overlapped (DMA hidden under compute)
$ curl http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"dlm","messages":[{"role":"user","content":"Hello"}]}'
{"choices":[{"message":{"role":"assistant",
"content":"Hello! How can I help?"}}],
"usage":{"completion_tokens":7}}
Prerequisites, if you'd rather compile it.
The installer needs none of this — it ships a prebuilt binary. You only need a toolchain to build dlm yourself or hack on it.
2021 edition, via rustup. Required to build.
build-essential / Xcode CLT / MSVC — usually already present.
CUDA 12.x — only for the CUDA build. Host fallback needs nothing; the rocm feature needs no toolkit (memory-only).
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThen install build tools: sudo apt install build-essential.
cargo build --releaseNo GPU, no feature flags. Page-aligned host buffers with the same layout contract — the whole pipeline runs on any machine.
Check your machine, then run a self-test.
dlm doctor reports the GPU backend and free VRAM, runs a CPU inference self-check, and — on a GPU build — runs a live CPU-vs-GPU parity probe.
dlm doctorPass --model-path to check a checkpoint loads and tokenizes.
First run not working? Start here.
Almost every first-run problem is one of these: a model that won't fit, an unsupported checkpoint, a gated repo, or a GPU build that can't find its runtime. Run dlm doctor first — it reports your backend and free VRAM, self-checks CPU inference, and with --model-path confirms the checkpoint loads and tokenizes.
dlm doctor --model-path ./models/Qwen2.5-0.5B-Instruct“Won’t fit” / slow because it streams
On the GPU a model too big for the card now streams on its own, and KV that doesn’t fit spills to host RAM. To speed it up, try --quant int4, or --gpu-layers N to run the rest on the CPU. If it’s still refused, lower --max-batch or --context-length. See Performance tuning.
PyTorch-only repo rejected
dlm loads safetensors and GGUF, not PyTorch .bin. Pull a safetensors variant, or a GGUF one with --file q4_k_m. See Model support.
401 — gated or private repo on pull
Pass --token or set $HF_TOKEN before pulling.
CUDA runtime can’t load at startup
dlm warns and falls back to CPU on its own. Check cudart is on the library path and CUDA_PATH is set.
--device gpu errors on a CPU build
A CPU-only build can’t use the GPU. Rebuild with --features cuda-kernels. See Build & features.
Model directory not recognized
The path needs config.json and one or more *.safetensors shards — or, for GGUF, point it at the .gguf file itself. dlm pull fetches the right files.
Still stuck? The full Troubleshooting guide has the complete error list and an FAQ. If it’s a bug, file an issue — include your dlm doctor output.
The GPU you already own is enough.
Clone the repo, run the profiler on your card, and watch a 70B model fit where it shouldn’t. No GPU required to try it.
Apache-2.0 · Rust 1.75+ · Linux · macOS · Windows