Changelog
Notable recent changes. For the authoritative, tagged version history, see GitHub Releases; for every commit, the commit log.
The latest tagged release is 0.5.2. Its full notes, with every measurement and the known gaps, are in the engine’s CHANGELOG.md. All speeds below were measured on one GTX 1650 (4 GB) with 16 GB of RAM.
0.5.1 and 0.5.2
The same engine as 0.5.0. Both releases restore the Windows CUDA build, which 0.5.0 shipped without: the newest MSVC on GitHub’s Windows runner crashes CUDA’s compiler. 0.5.1’s fix still failed to link, so use 0.5.2, the first 0.5 release with every build attached. On Windows, 0.5.0 and 0.5.1 installed the CPU build in its place.
0.5.0
Models
- Qwen3.5/3.6 MoE (text only) — the hybrid Gated DeltaNet layout, from safetensors or the
qwen35moeGGUF. bartowski’s 22 GB Qwen3.6-35B-A3B Q4_K_M streams on a 4 GB card at 2.5–2.9 tok/s decode. - Gemma 4 E2B and E4B (text, resident only) — E4B Q4_K_M decodes at 18.6 tok/s on the GPU.
- Image input for Gemma 3 4B/12B/27B — the SigLIP tower from the checkpoint or a llama.cpp
mmprojfile;dlm generate --image, andimage_urlparts asdata:URLs on the API. See Model support. - DeepSeek-V3/R1 routing — V3 checkpoints were refused for their router; dlm now routes as V3 does.
Speed
dlm pack— quantize a safetensors model once, ahead of time. Streamed Qwen3-1.7B int4: decode 0.06 → 1.0 tok/s, prefill 4–5 → 48–65, at half the disk. See Quantization.- Streamed MoE, rebuilt — experts cached in host RAM, grouped across tokens and run as one batched call each, staged through pinned memory, evicted by routing frequency, and prefetched from the next layer’s own router. TinyMixtral int4: decode 0.28 → 12.8 tok/s at batch 1 and 1.0 → 40.3 at batch 4.
- Direct disk reads — streamed weights arrive in one positioned, unbuffered read instead of being copied out of the memory map: 1,344 MB/s against 461 on NVMe, and 2–3x the streamed Qwen3.6 speed.
DLM_MMAP_READS=1switches back. - Partial RAM caches hit — every streaming cache now evicts the most recently used layer, so a cache smaller than the model still serves its share (2.5–2.7 → 3.65–3.96 tok/s with a third of Qwen2.5-0.5B cached).
- MTP and EAGLE-3 speculation —
--speculative mtpdrafts with Qwen3.5/3.6’s own head (Qwen3.6-35B: 1.5–1.6 → 2.1–2.6 tok/s), and an EAGLE-3 head works as--draft-model-pathon a resident GPU model. Hybrid models speculate too, with their recurrent state rolled back on a rejected guess. Greedy output is unchanged.
API & memory
- Tool calling for Llama 3.1/3.2 and Mistral v0.3, alongside ChatML.
--embedding-pooling auto | last | mean, and--prefix-cache-dir DIRto keep cached prompt prefixes across restarts.--kv-quant int4stays int4 on the GPU: 1.8x int8’s context in the same VRAM, at a real accuracy cost.- JSON keeps the client’s key order, so tools and schema properties reach the prompt as sent.
Fixed
- Gemma GGUF files did not load (and would have misread their norms and tokenizer if they had).
- DeepSeek MLA rotated the wrong pairs of its RoPE dimensions; it now matches
transformersto 1e-6. - MoE GGUF experts whose down projection uses a different quant type were decoded as the wrong format on the GPU.
0.4.x and earlier
Highlights from the releases before 0.5.0, as they stood then.
API & serving
- Structured output —
response_formatjson_objectorjson_schema, andgrammar(GBNF, llama.cpp’s format). Output always matches; unsupported schema keywords are a 400. See HTTP API. - Tool calling for ChatML models (Qwen2.5, Qwen3):
toolsin, OpenAItool_callsout, streamed or not. Other templates refusetools. /v1/embeddings— last-token pooling at unit length,floatorbase64, optionaldimensions.logprobsandn— per-token log-probabilities withtop_logprobs(0-20) on chat and completions;n(1-16) choices of one prompt, decoded in one batch.- More sampling controls —
logit_bias,frequency_penalty/presence_penalty, and DRY (dry_multiplierand llama.cpp’s otherdry_*fields), alongsidemin_pandrepetition_penalty. - Bounded, ordered queue —
--queue-timeout SECSturns away a request that waited too long with503andRetry-After; a request’spriority(lower first) orders admission. - Load gauges on /metrics —
dlm_requests_running,dlm_requests_waitingand, where the GPU pages KV,dlm_kv_free_tokens. See Deployment. --cors-originanswers browser preflights so a browser UI can reach the API. Off by default.- Client compatibility — the model id is the checkpoint’s own name, not
dlm;contentmay be an array of parts; a request withoutmax_tokensruns to EOS (clamped to the context window). - Distributed serving —
dlm serve --distributed-mode master --worker-nodes …now coordinates layer shards across worker nodes and serves the OpenAI endpoint directly, with heartbeats and CPU-RAM fallback on a dead worker. - Cross-request prefix cache —
--prefix-cache-size Nkeeps prompt-prefix KV snapshots so requests sharing a system prompt resume instead of re-prefilling it. On the GPU it is on by default (64 entries) and shares KV blocks rather than copying them. - Metrics & access log —
GET /metricsexposes Prometheus counters (dlm_requests_total, prompt/completion tokens, and — under--stream— layer-cache hits/misses and live prefetch depth); every request is logged to stderr. - Anthropic Messages API — the server serves
POST /v1/messagesand/v1/messages/count_tokens, with SSE streaming (message_start→content_block_delta→message_stop) andx-api-keyauth alongside bearer tokens. - OpenAI-compatible server with continuous batching, speculative decoding, real tokenizers, chat templates, and request hardening (bearer/api-key auth, body-size cap).
Streaming & memory
- A model too big for the card streams on its own — on the GPU, without
--streamor--gpu-layers, a model whose weights don’t fit is streamed instead of refused, and aplacementline says so. See Performance tuning. --gpu-layers N— layers that don’t fit in VRAM run on the CPU instead of streaming over PCIe (llama.cpp’s-ngl).--streamstays the better choice for long prompts.- KV cache in host RAM — a resident GPU model whose full context doesn’t fit keeps the overflow layers’ KV in page-locked host RAM instead of being refused at startup.
- int8 GPU KV cache by default —
--kv-quant automeans int8 on the GPU (56% of fp16’s memory, at fp16’s speed, within 0.005 nats per token on the models measured);--kv-quant f16keeps the old cache. --streamon the GPU is no longer experimental — a soak test and a streamed-vs-resident check on real GGUF files now cover it, and GPU streaming is up to 20% faster.- Weight quantization —
--quant int4 | int8quantizes a float checkpoint at load (group-affine, groups of 128) for layers 4x or 2x smaller — usually enough for more of the model to stay resident and streaming to shrink or stop. See Quantization. - Scaled safety margin — the default VRAM cushion is a tenth of the card (256 MiB to 1.5 GiB) instead of a fixed 1.5 GiB;
--safety-margin-gbstill overrides it. - Layer prefetch — the streaming engine loads the next layers while the current one computes, hiding load latency under the math. On the CPU path,
--prefetch-depth Nsets how far ahead and--auto-prefetchtunes it; on the GPU the worker always loads the next layer the pass is missing. - GPU weight prefetch — the GPU streaming path now uploads the next layer’s weights to VRAM on a non-blocking copy stream, overlapping the PCIe transfer with compute. Validated on-device.
Models & hub
- GGUF files —
--model-path model.ggufruns on CPU or GPU, resident or streamed, with config and tokenizer read from the file. F32/F16/BF16, Q4_0–Q8_0, the K-quants including Q2_K and Q3_K, and the IQ2/IQ3/IQ4 types; IQ1 and MoE GGUF files are refused. See Model support. - MoE on the resident GPU path — a Mixture-of-Experts model whose experts fit in VRAM now runs resident instead of being refused; streaming still covers one that doesn’t.
- Architectures — Qwen3, Gemma 1, 2 and 3 (the 4B–27B multimodal checkpoints as text models), Phi-3/3.5, GPT-2, Falcon (config-verified only, no runnable checkpoint tested) and DeepSeek MLA, on CPU and GPU.
- GPTQ checkpoints load directly — 4-bit GPTQ with
desc_act: falseis validated against a real export; act-order GPTQ and AWQ decode with a warning. See Quantization. --lora— merges a PEFT LoRA adapter into a safetensors model at load, so it runs at the base model’s speed and size.- Hugging Face hub —
dlm searchanddlm pullfind and download models straight from the hub, nohfCLI needed;dlm search --ggufanddlm pull <repo> --file q4_k_mfetch one GGUF file.
GPU, tooling & install
- n-gram speculative decoding — proposes from the request’s own context with no draft model; on by default on the GPU (
--speculative auto), off with--speculative off. Greedy output is unchanged. - Faster GPU kernels — on a GTX 1650, prefill is 4.6–6x faster than 0.4.x and decode up to 1.7x, with later work speeding batched and sampled decode further. See Performance tuning and the Benchmarks.
dlm score— the log-probability the model gives each token of a text, to check against transformers or measure what a quantization costs (--decode,--quant,--kv-quant). See CLI reference.dlm bench --compare base.json— checks a build against a saved baseline and exits non-zero if prefill or decode tok/s fell by more than--tolerancepercent (default 5).- Dockerfile —
docker build -t dlm .builds a 165 MB CUDA image that needs only the driver (--gpus all). See Deployment. - GPU by default on
cuda-kernelsbuilds;--device cpuforces the host kernel. - One-line installer — a prebuilt binary per platform, with automatic CUDA/CPU build selection, plus
update.sh/uninstall.shfor the rest of the binary’s lifecycle. - Shell completions —
dlm completions <shell>generates bash/zsh/fish/ elvish/powershell completion scripts.
The project was renamed from
flip to dlm (Dynamic LLM). Older references to flip in third-party posts refer to the same engine.