allenai/dr-tulu2
HF Paper ↗A 4B deep research agent trained with reinforcement learning over local BM25 collections
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
DR Tulu 2 separates policy inference, tool execution, and reinforcement-learning training. In drtulu2-client/, a Python Verifiers environment connects a vLLM-served checkpoint to search and terminal tools. The harness lets the agent submit queries, open documents, and refine its search across successive tool calls before generating an answer. The demo shows HTTP JSON requests to /search; load_environment accepts separate search and terminal endpoint URLs.
In drtulu2-training/, Prime-RL handles the training loop and literegistry orchestrates tool servers during training. Each simulated task pairs a research question with a searchable document collection. Serving those collections locally keeps rollout queries independent of live search quotas. The separate tool endpoints also let engineers test corpus retrieval without starting vLLM or a training job.
Key Capabilities & Differentiators
The 4B policy starts from Qwen3.5-4B and trains through General Web, Science, and Finance in that order. The General Web checkpoint selected at step 400 initializes Science; Science step 200 initializes Finance; step 100 is selected for Finance. The three corresponding Hugging Face corpora can be indexed locally with BM25 using drtulu2-client/build_hf_indexes.sh.
For BrowseComp-Plus, the client generates answers, records tool calls, and supports a separate grading pass via eval.sh grade after eval.sh generate. The included 32-question example is a small evaluation workflow, not a performance result. The tool layer can also search the live web through Serper and fetch pages through Jina, but that path uses different data and infrastructure from simulated training.
Trade-offs & Limitations
Compared with a conventional retrieve-then-generate RAG pipeline, DR Tulu 2 makes iterative search part of the learned policy and exposes its tool-call trace for analysis. That is useful when reformulating queries or opening several documents is central to the task, but it adds sequential tool calls and more services to operate. If one retrieval pass is enough, the simpler pipeline is easier to deploy and debug.
Compared with a hosted web research API, local BM25 gives teams control over the corpus and removes per-query search charges and external search quotas from simulated rollouts. The trade-off is ownership of corpus storage, indexing, GPU serving, and training orchestration. Fixed collections cannot establish performance on a changing web; switching to live search restores external dependencies and rate limits. GPT-4.1 grading also means the standard grading path is not entirely offline, even if retrieval and inference are local.
Hardware & Deployment Guide
Start with ./drtulu2-client/quickstart_docker.sh to bring up the bundled demo search corpus and test the HTTP service on port 1214. For BrowseComp-Plus, run vLLM with the checkpoint, serve the benchmark corpus and its BM25 index, and run the Python evaluation client. Docker and Apptainer are both shown for the 32-question example. Local retrieval needs no live search API credentials; GPT-4.1 grading needs OPENAI_API_KEY, and live search and page fetching need SERPER_API_KEY and JINA_API_KEY, respectively.
Budget disk for the corpus and index separately from GPU memory for inference. The 4B parameter count is not a VRAM estimate: precision, context length, and concurrent sequences affect the vLLM footprint. For training, use the Prime-RL image-build and multi-node launch assets for Slurm or Beaker and size that workload separately from evaluation. No tagged release is listed, so pin the repository revision alongside model and data artifacts when reproducing a run.
drtulu2-client/build_hf_indexes.sh builds local BM25 indexes for the General Web, Science, and Finance corpora.literegistry orchestrates tool servers, and launchers target Slurm and Beaker.127.0.0.1:1214, independent of model serving.Research teams studying multi-step search policies with controlled corpora, inspectable tool traces, and an evaluation path before committing to distributed training.
A single-pass RAG system covers the workload, live-web freshness is the overriding requirement, or you cannot operate GPU inference and local indexes.
Quick Start & Installation
curl -fsS http://127.0.0.1:1214/search \ -H 'Content-Type: application/json' \ -d '{"mode":"query","query":"astronomy","num_results":1}'
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/allenai/dr-tulu2.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about dr-tulu2
How do I connect the model to the research tools?
load_environment, passing a question JSONL file and the search_server_url and terminal_server_url parameters. The bundled Docker demo lets you check the tool service independently of model inference.What hardware should I budget for evaluation and training?
Can I self-host this commercially under Apache-2.0?
LICENSE and THIRD_PARTY_NOTICES.md before redistribution. Check the terms for the model checkpoint, corpora, benchmark data, and external API providers separately; the repository license does not grant rights to those assets or services.When should I choose this over conventional RAG or a hosted research API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy