Key facts
- DR-Tulu2-4B (Ai2, released December 1, 2026, Apache 2.0) is a 4B deep research agent built on Qwen3.5-4B. A community Q4_K_M GGUF by bartowski is 2.74 GB.
- On our 8-core CPU box with no GPU, Ollama 0.40.19 ran it at about 9.5 tokens/s for generation and 67 tokens/s for prompt processing. The server process used about 5.1 GB of RAM with a 16K context.
- The model only becomes a research agent once you give it tools. We wired up a 90-line Python loop with a local BM25
searchtool and a grep-stylereadtool. It answered a two-part question correctly after 5 tool calls in 151 seconds. - Ai2’s official harness uses vLLM, Docker services and paid Serper/Jina keys for live web search. This guide is the small local version for trying the model out.
Tested on 8-core Intel Xeon CPU, 16 GB RAM, no GPU, Linux, Ollama 0.40.19, Q4_K_M GGUF
DR Tulu 2 is small enough to run on almost any recent computer, but it isn’t a chatbot. It was trained to search, read and then answer. This guide shows how to run it locally with Ollama on Windows, macOS or Linux and give it a working toolset over your own documents. Everything below was run and timed on our test box on December 2, 2026.
What you need
| Minimum we’d suggest | What we tested | |
|---|---|---|
| OS | Windows 10/11, macOS, Linux (anything Ollama supports) | Linux x86-64 |
| RAM | 8 GB (16 GB comfortable) | 16 GB, about 5.1 GB used by the model server |
| GPU | Optional. Any GPU with 4 GB+ VRAM will be much faster | None (CPU only) |
| Disk | 3 GB for Q4_K_M, 4.5 GB for Q8_0 | Q4_K_M, 2.74 GB |
| Software | Ollama (recent release that knows the qwen35 architecture), Python 3 |
Ollama 0.40.19, Python 3 standard library only |
The quant files come from bartowski/allenai_DR-Tulu2-4B-GGUF, made with llama.cpp release b12843. Sizes range from 1.59 GB (IQ2_M) to 8.42 GB (bf16). bartowski suggests Q4_K_M as the default, and so do we. Very low-bit quants tend to hurt tool-calling first. The original weights are at allenai/DR-Tulu2-4B.
One small discrepancy: Ai2 calls it a 4B model. bartowski’s card says “5B (source checkpoint),” and Ollama reports 4.2B for the GGUF. The Hugging Face checkpoint uses Qwen3.5’s vision-capable architecture class. The GGUF we ran is text-only.
Step 1: Install Ollama
Download Ollama from ollama.com/download, or on Linux:
curl -fsSL https://ollama.com/install.sh | sh
ollama --version
If ollama --version says it can’t connect to a server, start one with ollama serve in another terminal. On Windows and macOS the desktop app starts it for you. New versions also show up in our Ollama install guide.
Step 2: Download the model
The one-line way pulls straight from Hugging Face:
ollama pull hf.co/bartowski/allenai_DR-Tulu2-4B-GGUF:Q4_K_M
On our box that command stalled at “pulling manifest.” Ollama refused a Hugging Face CDN redirect because of our network setup (“redirect target not allowed”). That’s unusual for a home connection. If it happens to you, download the file directly and import it:
mkdir -p ~/drtulu2
curl -L -o ~/drtulu2/allenai_DR-Tulu2-4B-Q4_K_M.gguf \
https://huggingface.co/bartowski/allenai_DR-Tulu2-4B-GGUF/resolve/main/allenai_DR-Tulu2-4B-Q4_K_M.gguf
sha256sum ~/drtulu2/allenai_DR-Tulu2-4B-Q4_K_M.gguf
The SHA-256 we got, 06507ef35b9f538131b44a64bf49708578ecc615747a51edaba4d45e7e51dc08, matches the hash on the Hugging Face file page.
Step 3: Create the Ollama model with a bigger context
Research agents read a lot, so a 2K or 4K context fills up after one or two searches. Create a Modelfile that sets 16K:
FROM /home/you/drtulu2/allenai_DR-Tulu2-4B-Q4_K_M.gguf
PARAMETER num_ctx 16384
Then build it:
ollama create dr-tulu2:4b-q4_K_M -f Modelfile
The model was trained with a 128K context. You can go higher if you have the RAM, because the KV cache grows with num_ctx. Our context windows explainer covers the math.
Step 4: Verify it loads and check the speed
ollama show dr-tulu2:4b-q4_K_M
ollama run dr-tulu2:4b-q4_K_M --verbose --think=false "List three things a deep research agent needs in order to answer a question with sources. Keep it under 80 words."
ollama ps
ollama show should list architecture qwen35, 4.2B parameters, Q4_K_M, and the capabilities tools and thinking. If tools is missing, your Ollama build didn’t read the GGUF’s chat template, and tool calls won’t work. Update Ollama.
Our --verbose numbers:
| Measurement (CPU only, 8 cores) | Result |
|---|---|
| Prompt processing | 66.6 tokens/s |
| Generation | 9.5 tokens/s (4.9 tokens/s on the very first cold run) |
| Load time, first run | about 7 s |
| Model server RAM (16K context) | about 5.1 GB resident |
Ollama’s ps column read “31%/69% CPU/GPU” on our box even though Ollama’s log showed it found only a CPU (library=cpu). Ignore that column when there’s no GPU. Expect a GPU or Apple Silicon Mac to be several times faster.

Step 5: Give it tools
DR Tulu 2 was trained with two tools: search, which returns snippets from the top 10 results, and webterminal, which fetches pages and lets the agent explore them with commands like grep and head. Ai2’s repo ships those as Docker services for live web or local BM25 search.
For a quick local test we wrote a smaller version. It uses Python’s standard library only and talks to Ollama’s OpenAI-compatible endpoint. Put a few .txt files in a corpus/ folder next to it. We used four saved launch pages: Ai2’s DR Tulu 2 post, Ai2’s Beyond the Model post, Google’s CellGemma post and Amazon’s Ergo post.
#!/usr/bin/env python3
"""Tiny local 'deep research' loop for DR-Tulu2-4B on Ollama.
Two tools, loosely modeled on DR Tulu 2's search + webterminal:
search(query) -> top-5 BM25 passages from ./corpus
read(doc, pattern) -> lines of one document matching a regex (like grep)
"""
import json, math, re, sys, time, pathlib, urllib.request
MODEL = "dr-tulu2:4b-q4_K_M"
URL = "http://127.0.0.1:11434/v1/chat/completions"
DOCS = {p.stem: p.read_text() for p in pathlib.Path("corpus").glob("*.txt")}
# --- BM25 over ~120-word passages -------------------------------------------
tok = lambda s: re.findall(r"[a-z0-9$.,]+", s.lower())
passages = []
for name, text in DOCS.items():
words = text.split()
for i in range(0, len(words), 100):
passages.append((name, " ".join(words[i:i + 120])))
N = len(passages)
toks = [tok(p) for _, p in passages]
avgdl = sum(map(len, toks)) / N
df = {}
for t in toks:
for w in set(t):
df[w] = df.get(w, 0) + 1
def search(query, k=5):
q = tok(query)
scores = []
for i, t in enumerate(toks):
s = 0.0
for w in q:
f = t.count(w)
if f:
idf = math.log(1 + (N - df[w] + 0.5) / (df[w] + 0.5))
s += idf * f * 2.2 / (f + 1.2 * (0.25 + 0.75 * len(t) / avgdl))
scores.append((s, i))
top = sorted(scores, reverse=True)[:k]
return "\n\n".join(f"[doc: {passages[i][0]}] {passages[i][1][:600]}" for s, i in top if s > 0) or "no results"
def read(doc, pattern=""):
text = DOCS.get(doc)
if text is None:
return f"unknown doc. available: {', '.join(DOCS)}"
lines = [l for l in text.splitlines() if not pattern or re.search(pattern, l, re.I)]
return "\n".join(lines)[:3000] or "no matching lines"
TOOLS = [
{"type": "function", "function": {"name": "search", "description": "Search the local document collection. Returns the top 5 passages with their doc name.",
"parameters": {"type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"]}}},
{"type": "function", "function": {"name": "read", "description": "Read one document by name. Optional regex pattern keeps only matching lines (like grep -i).",
"parameters": {"type": "object", "properties": {"doc": {"type": "string"}, "pattern": {"type": "string"}}, "required": ["doc"]}}},
]
def chat(messages):
body = json.dumps({"model": MODEL, "messages": messages, "tools": TOOLS, "temperature": 0.6, "max_tokens": 4096}).encode()
req = urllib.request.Request(URL, body, {"Content-Type": "application/json"})
return json.load(urllib.request.urlopen(req, timeout=1800))
question = sys.argv[1]
messages = [{"role": "system", "content": "You are a research assistant. Use the search and read tools to find evidence before answering. Cite the doc name for each fact."},
{"role": "user", "content": question}]
t0 = time.time()
MAX_STEPS = 12
for step in range(1, MAX_STEPS + 1):
if step == MAX_STEPS:
messages.append({"role": "user", "content": "Stop searching and give your final answer now, with the doc names you used."})
r = chat(messages)
msg = r["choices"][0]["message"]
u = r.get("usage", {})
messages.append({k: v for k, v in msg.items() if k in ("role", "content", "tool_calls", "reasoning")})
calls = msg.get("tool_calls") or []
print(f"--- step {step}: {len(calls)} tool call(s), {u.get('completion_tokens')} output tokens, {time.time()-t0:.0f}s elapsed", flush=True)
if not calls:
print("\nFINAL ANSWER:\n" + (msg.get("content") or "").strip())
break
for c in calls:
args = json.loads(c["function"]["arguments"] or "{}")
fn = {"search": search, "read": read}.get(c["function"]["name"])
out = fn(**args) if fn else "unknown tool"
print(f" {c['function']['name']}({json.dumps(args)}) -> {len(out)} chars", flush=True)
messages.append({"role": "tool", "tool_call_id": c.get("id", ""), "content": out})
print(f"\ntotal time: {time.time()-t0:.0f}s")
The design choices follow Ai2’s setup in miniature. search is plain BM25, the same retriever family Ai2 used in training, and read lets the model grep inside a document instead of loading all of it. The script stops after 12 steps and asks for an answer on the last one.
Step 6: Run a research question
python3 mini_research.py "According to Ai2, what did search API calls cost when training DR Tulu 2 in simulation versus on the live web, and which base model was DR Tulu 2 trained from?"
Our run took 151 seconds: three searches and two read calls, then the answer. It got both parts right: $17.52 in simulation vs $4,548 on the live web, and Qwen3.5-4B as the base. It cited the Ai2 blog post as its source. That matches the Ai2 announcement.
Our first attempt used an 8-step limit, and the model hit it while still searching. It kept looking for the base model with queries our simple tokenizer didn’t match well. The 12-step limit with a final “answer now” message fixed it. Expect this kind of thing with small agents. Give them a step budget and a clear point where they have to stop.
Troubleshooting
ollama pullhangs at “pulling manifest”: download the GGUF withcurland use a Modelfile (steps 2–3).- The model answers without calling tools: check that
ollama showliststools. Also put “use the search and read tools” in the system prompt. DR Tulu 2 isn’t meant to answer from memory. Ai2’s model card lists that as out of scope. - Answers get cut off or the model forgets earlier results: raise
num_ctx. Every tool result is added to the context. - Very slow on CPU: use a smaller quant (Q4_K_S at 2.55 GB, IQ4_XS at 2.43 GB), lower
num_ctx, or switch off thinking for quick checks with--think=false. Keep thinking on for real research runs. - You want benchmark-grade results: use Ai2’s harness. The client guide serves the model with vLLM on a GPU and needs
SERPER_API_KEYandJINA_API_KEYfor live-web search.
Bottom line
DR-Tulu2-4B runs comfortably on a plain CPU: 2.74 GB on disk, about 5 GB of RAM, around 9–10 tokens/s. The interesting part isn’t the chat. It’s the search-read-answer loop. Point the script above at your own notes or documentation and you have a private research agent you can inspect step by step. For the release itself and how it compares with other open agents, see our December 1–2 releases roundup.
Sources: Ai2: Introducing DR Tulu 2, DR-Tulu2-4B model card, allenai/dr-tulu2 on GitHub, DR Tulu 2 client guide, bartowski/allenai_DR-Tulu2-4B-GGUF, Ollama download. Tested and facts checked December 2, 2026.
Cover image: our own terminal capture of DR-Tulu2-4B (Q4_K_M) running in Ollama 0.40.19 on a CPU-only Linux box, December 2, 2026 (AI Models Blog).
