Home / use case

Running NVIDIA's looped Dory 4B on a CPU homelab with llama.cpp and an Ollama wrapper

At a glance
Hardware
Debian 13 VM with 6 vCPUs and 6 GB RAM on an i7-10700, no GPU, on a shared host
Models & engines
Fork brianchmielNV/llama.cpp at commit 98a74c97ea09ac72f6ceda1559808fc0a2f447ce (reports 0.6.0-dev); the build took 227 seconds on six threads
NVIDIA-Nemotron-Labs-Dory1.0-4B-Q5_K_M.gguf, compared with Unsloth's Qwen3.5-4B-Q4_K_M.gguf on the same fork
Ollama 0.40.15
Key gotcha
The GGUF defaults to 4 loops, the slowest setting, while NVIDIA recommends 2; without --override-kv nothing warns you.

What they built

NVIDIA's Nemotron Labs Dory 1.0 4B is a looped transformer: part of the network runs one to four times per token, chosen at load time. Big Iron wanted to see what that means on a homelab without a GPU.

He built the required llama.cpp fork on a throwaway Debian 13 VM, tested every loop setting on CPU against Qwen3.5-4B for speed, memory, tool calling and math, and then made it work inside Ollama, which can import the model but not run it.

The write-up includes exact commands, the numbers, and the places where his own tests went wrong.

Setup

  • Debian 13 VM with 6 vCPUs and 6 GB RAM on an i7-10700, no GPU, on a shared host
  • Fork brianchmielNV/llama.cpp at commit 98a74c97ea09ac72f6ceda1559808fc0a2f447ce (reports 0.6.0-dev); the build took 227 seconds on six threads
  • NVIDIA-Nemotron-Labs-Dory1.0-4B-Q5_K_M.gguf, compared with Unsloth's Qwen3.5-4B-Q4_K_M.gguf on the same fork
  • Ollama 0.40.15

How it works

  1. llama-server is started with --override-kv "dory.num_loops=int:2,dory.recurrent_kv_cache_mode=str:per_loop", bound to 127.0.0.1, with the model card's sampling and cache settings.
  2. For Ollama, he replaced /usr/local/lib/ollama/llama-server with a bash script that detects the dory architecture in the GGUF header and sends those models to the fork, with LD_LIBRARY_PATH pinned to the fork's directory; every other model goes to Ollama's original binary.
  3. He ran five rotating rounds per setting and reports best-of-five speeds because the host was shared.

Results & numbers

  • Best speeds on CPU: 3.30 tokens/s at 1 loop, 2.38 at 2, 1.43 at 4; Qwen3.5-4B did 3.57.
  • Every setting picked the right tool with exact arguments in 6 of 6 tool-calling prompts, including 1-loop Dory.
  • With thinking off, all settings answered three GSM8K problems correctly in roughly 38 to 109 seconds each; with thinking on at 2 loops the same problems took 9 to 18 minutes with no gain.
  • last_loop cache mode saved 177 MiB at 2 loops and 509 MiB at 4 loops with no measurable speed penalty.
  • Through the Ollama wrapper, chat, separate thinking output and tool calls worked; on a RAID 5 question, all six thinking runs used their full 1,500 tokens without an answer.

Gotchas

  • The GGUF defaults to 4 loops, the slowest setting, while NVIDIA recommends 2; without --override-kv nothing warns you.
  • The model card's commands use a filename that doesn't match the repository file, so pasting them gives file not found.
  • Stock Ollama 0.40.15 creates and shows the model, then fails with unknown model architecture: 'dory'. The wrapper is a hack that an Ollama upgrade will overwrite.
  • Under Ollama the fork failed with no backends are loaded until LD_LIBRARY_PATH was set to the fork's own directory.
  • Thinking on a small token limit returns empty content; raise max_tokens or start with --reasoning off.
  • llama-server has no API key by default and allows all CORS origins, so keep it on loopback or behind an auth proxy.
“Without an override, you silently get the slowest setting.”— Big Iron

Do it yourself

  1. Install build-essential, cmake, git and curl, fetch the fork at the pinned commit, and build llama-server with HF_UI_VERSION set and GGML_NATIVE=ON on the machine that will run it.
  2. Download the Q5_K_M GGUF from NVIDIA's Hugging Face repo and check its SHA-256 against the file page.
  3. Start llama-server on 127.0.0.1 with --override-kv choosing 1 or 2 loops; use last_loop if memory is tight.
  4. On CPU, use --reasoning off for tool calling and short tasks.
  5. If you need Ollama, install the wrapper script, restart the service, set DORY_LOOPS with systemctl edit ollama, and restore llama-server.real once official support lands.
./build/bin/llama-server \
  -m ~/models/NVIDIA-Nemotron-Labs-Dory1.0-4B-Q5_K_M.gguf \
  --host 127.0.0.1 --port 8090 -t 6 -ngl 0 \
  --ctx-size 4096 --jinja --reasoning on \
  --override-kv "dory.num_loops=int:2,dory.recurrent_kv_cache_mode=str:per_loop"
Source: Big Iron · Published 2026-11-08 · Added 2026-11-10. This write-up summarizes the original source; see it for full details.

Similar setups

Replacing Ollama with a llama.cpp router on a shared workstation GPU

A developer moved a busy single-GPU workstation (chat UI, agent, batch study-guide writer, embedders, classifiers) from Ollama to llama.cpp's router mode and measured throughput and embedding parity before switching.

shuffle-on blog · 2026-11-08

Two Qwen Code sessions on one Ollama slot waited 46 seconds; a slot each waited one

Tensward ran two Qwen Code sessions against Qwen3.8-27B on a 24 GB L4 and found that sharing one Ollama slot raised the median wait for a response to start from about one second to 46.

Tensward · 2026-11-19

Running a 35B MoE model on a laptop with a 4 GB GTX 1650: measured, not guessed

Nabil Doghri ran Qwen3.6-35B-A3B (Q4_K_M) through Ollama on a GTX 1650 Max-Q laptop and measured about 21-22 tokens per second once loaded, with most of the 23 GB model sitting in system RAM.

Nabil Doghri on DEV (in French) · 2026-11-18

LM Studio vs Ollama on an RTX 5080: memory settings mattered more than the app

LK Wood IV ran LM Studio and Ollama on the same RTX 5080 with identical GGUF files and found the apps within 14% of each other, while one wrong offload or context setting cost up to 3.4x.

LK Wood IV (DEV Community) · 2026-11-01