Run models bigger than your VRAM.
Whatever card you have — 4, 6, 8, 16 GB or more. dlm quantizes the weights at load so more of the model stays resident, and streams whatever still doesn’t fit.
Apache-2.0 · No GPU required to try the profiler.
Amber executes on the GPU while teal streams the next window in over PCIe — then they swap. DMA hides under compute.
Live budget — same formula the engine runs. Try your own card.
The model doesn't fit. That's the whole problem.
Resident loading means every weight sits in VRAM at once, so the card's size is a hard yes-or-no on the model. dlm answers that two ways: shrink the weights so they fit, and stream whatever still doesn't. It's not a 16 GB tool — it's for the 4 GB laptop GPU, the 6 GB gaming card, the 8 GB workstation.
Quantize before you stream.
--quant int4 shrinks each layer 4x at load (int8: 2x), which usually means more of the model stays resident and streaming shrinks or stops entirely — worth far more than any amount of making streaming itself faster. Measured on a 4 GB GTX 1650: a 1.5B model that doesn't fit in 16-bit goes from 21–27 tok/s streamed to 79–87 tok/s fully resident.
Pinned zone
always residentEmbeddings, final norm, and the LM head never move. They stay put so every token starts and ends without a transfer.
Streaming zone
double-buffered A · BA working window of layers lives here. Buffer A computes the current block while buffer B streams the next one in — then they swap. That swap is the whole trick.
Cache zone
spills to CPU RAM · NVMeLayers not in VRAM wait in a tiered CPU-RAM cache backed by the weights on NVMe. They stream in on demand, just ahead of when they're needed.
What still doesn't fit gets streamed.
A layer is read from NVMe in one unbuffered read, held in an optional host-RAM cache, staged in a page-locked buffer, and uploaded on a dedicated copy stream so the transfer overlaps compute. Be clear-eyed about the limit: streaming costs bandwidth, and moving most of a model across the bus every token costs far more than the arithmetic does. The window evicts the most recently used layer, so most of it stays put across tokens and only the rest crosses the bus.
one unbuffered read per layer or expert
hot layers held in host RAM
page-locked buffer for transfer
next window lands here
current window executes
Stages 01–04 run asynchronously while stage 05 computes. The transfer never blocks the GPU — DMA hides under compute, so the next layer is already resident when it’s needed.
A complete inference engine.
Load-time quantization, the streaming core, the CUDA kernels, the server loop, and the scaling stack — shipped and running today.
Zero-dependency local inference
shippedA single Rust binary. No Python runtime, no container, no cloud call. Runs air-gapped on the machine you already have.
Quantize at load — the lever that matters
shipped--quant int4 shrinks each layer 4x (int8: 2x) from a float checkpoint, so more of the model stays resident and streaming shrinks or stops entirely. On a 4 GB card it took a 1.5B model from 21–27 tok/s streamed to 79–87 fully resident. dlm pack does it once, ahead of time, for a model that still streams.
OpenAI + Anthropic API
shipped/v1/chat/completions, /v1/completions, /v1/messages and count_tokens — with SSE streaming, tool calling, image input for Gemma 3, bearer or x-api-key auth, and Prometheus /metrics. Either SDK points at dlm with a URL change.
Dynamic VRAM profiling
shippeddlm profile measures your card and reports exactly how many layers stay resident — before you load a single weight.
Layer streaming, for what still won't fit
shippedA bounded window of layers, read straight from NVMe; a miss uploads on a dedicated copy stream so the transfer overlaps compute, and evicts the most recently used layer, so most of the window stays put across tokens. Output is bit-for-bit identical to a fully-resident run — but streaming costs bandwidth, so quantize first.
Speculative decoding
shippedA small draft model, an EAGLE-3 head, Qwen3.6's own MTP head, or n-gram lookup over the request's own context (on by default on the GPU) proposes tokens the large model verifies in bulk; with greedy sampling the output is provably identical to plain decoding. Per-request acceptance lands in the usage response.
Multi-GPU / multi-node scaling
shippedPipeline-parallel across local GPUs, or shard layers across worker nodes over TCP with heartbeats and local fallback. Scheduling, routing and correctness are implemented and tested on CPU over localhost; NCCL/RCCL transport is future work.
Cross-request prefix cache
shippedRequests that share a system prompt resume from a cached KV snapshot instead of re-prefilling it — real savings on shared prefixes.
MoE bigger than your VRAM and RAM
shippedA streamed Mixture-of-Experts model keeps attention and routers resident and fetches only the experts each token picks — cached by routing frequency, prefetched from the next layer's router, run once per batch. Qwen3.6-35B-A3B, a 22 GB file, decodes at 2.5–2.9 tok/s on a 4 GB card with 16 GB of RAM.
Continuous batching
shippedA background scheduler admits concurrent requests into each streaming pass, with per-request output identical to running alone.
The numbers, and exactly when they hold.
The tok/s figures below were measured on a 4 GB GTX 1650; the resident-layer count comes from the engine's own budget math. Every figure states its hardware and its --quant setting so you can judge it against your own. The projected throughput model lives on the benchmarks page, labelled as a projection.
total decode at batch 16, Qwen2.5-0.5B bf16 · 4 GB GTX 1650 — 1.4–1.6× vLLM fp32 (269–318) on the same card, measured back to back
Qwen2.5-1.5B at --quant int4, all 28 layers resident (79–87 tok/s), vs bf16 streamed (21–27 tok/s, 27/28 resident) on the same 4 GB card — quantizing beats streaming
decode of Qwen3.6-35B-A3B, a 22 GB Q4_K_M GGUF, on the same 4 GB card with 16 GB of RAM — experts streamed from NVMe, answers matching the CPU's
Point the profiler at your card. Read the plan.
No weights loaded, no GPU required — dlm profile does the budget math and tells you what will stay resident before you commit. Pass --model-path to profile a real checkpoint from its measured layer sizes.
$ dlm profile --quant int4
gpu backend : none (host fallback)
geometry : 80 layers, hidden 8192, 64 q-heads / 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
usable : 12288.0 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)
What's shipped, and what isn't.
dlm is built in the open, one phase at a time — the streaming core, the CUDA kernels, and the full serving stack are merged and shipped. AMD GPU compute is not: the rocm-kernels build compiles from source but has not been verified on an AMD card, so there is no prebuilt ROCm binary.
The streaming core
- VRAM profiler & layer-budget math
- Double-buffered A/B streaming schedule
- CPU host-fallback kernel
On the GPU
- CUDA compute kernels — AMD/ROCm compute planned
- PagedAttention KV cache
- Speculative decoding
Serve & scale
- OpenAI-compatible server loop
- Multi-GPU / multi-node partitioning
- Quantization-aware layer packing
Beyond the card
- Streamed MoE from NVMe — a 35B model on 4 GB
- dlm pack: quantize once, stream ready weights
- Image input, MTP and EAGLE-3 speculation
A different bet than resident loading.
Most engines assume the model lives in VRAM in full. dlm streams it, which changes what runs on the hardware you own.
| dlm | vLLM | llama.cpp | |
|---|---|---|---|
| Approach | Stream layers through VRAM | Resident in VRAM | Resident + CPU offload |
| Model larger than VRAM | Yes — streamed | Must fit | Partial (CPU spillover) |
| Primary target | Consumer GPU | Datacenter GPU | CPU / consumer |
| Weights in VRAM at once | A working window | All layers | Offloaded split |
| API | OpenAI + Anthropic | OpenAI | OpenAI (server) |
| Runtime | Single Rust binary | Python | C++ binary |
Reflects each project’s typical default approach; capabilities evolve.
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
