DR-Tulu2-WebGPU / index.html
Nekochu's picture
Page reading: stub detection, defuddle.md and Wayback tiers
54009a5 verified
Raw History Blame Contribute Delete
4.21 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DR Tulu 2 WebGPU</title>
<meta name="description" content="Ai2's open 4B deep research agent, DR-Tulu2-4B, thinking on your own GPU in the browser reading the web through free, key-less services.">
<link rel="icon" href="data:,">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<p id="line"><b><a href="https://huggingface.co/allenai/DR-Tulu2-4B" target="_blank" rel="noopener">DR Tulu 2</a></b>
is a 4B deep research agent from Ai2. Everything runs in this page: the model on <b>your GPU</b>, and its web search and page reading through free, key-less services.</p>
<form id="ask" autocomplete="off">
<label for="q" class="sr">Research question</label>
<textarea id="q" rows="3" maxlength="1500" placeholder="Ask something that needs looking up…" spellcheck="true"></textarea>
<div id="row">
<button id="go" type="submit">Research</button>
<button id="stop" type="button" hidden>Stop</button>
<span id="examples"></span>
</div>
</form>
<p id="status" role="status" aria-live="polite">Ready. The model (2.7 GB) downloads once, when you first press Research.</p>
<div id="bar"><i></i></div>
<section id="answer" hidden>
<h2>Answer</h2>
<p id="short"></p>
<div id="report"></div>
</section>
<section id="trail" aria-label="Research steps"></section>
<details id="more">
<summary>How it works, limits and credits</summary>
<p><b>Model.</b> <a href="https://huggingface.co/allenai/DR-Tulu2-4B" target="_blank" rel="noopener">allenai/DR-Tulu2-4B</a> (Apache-2.0), reinforcement-learned on Qwen3.5-4B, runs in your browser as a 4-bit K-quant GGUF
(<a id="repo" target="_blank" rel="noopener">bartowski's Q4_K_M</a>) on <a href="https://github.com/ngxson/wllama" target="_blank" rel="noopener">wllama</a>, llama.cpp compiled to WebAssembly with its WebGPU backend. It needs about 4 GB of free memory; without WebGPU it runs on the CPU, slowly.
Expect minutes per answer. Open this Space in its own tab (not the embedded view) for multi-threading.</p>
<p><b>Agent.</b> The prompt, the two tools (<code>search</code>, <code>webterminal</code>), the 150-call budget and the final-answer warning are from
<a href="https://github.com/allenai/dr-tulu2" target="_blank" rel="noopener">allenai/dr-tulu2</a>. Its live mode uses paid Serper and Jina keys; here there is no server at all:
<code>search</code> reads DuckDuckGo results (Brave as backup) and <code>browse</code> reads pages through <a href="https://jina.ai/reader" target="_blank" rel="noopener">Jina Reader</a>'s anonymous, browser-friendly endpoint
(it renders JavaScript and gets past most bot walls); if a site refuses it, the page is retried through defuddle.md, a direct read and the newest Wayback Machine copy. Hard paywalls and bot-protected news sites (Reuters, NYT…) stay unreadable, and the model is told so. Search falls back to Wikipedia and OpenAlex.
The terminal is a small safe runner written in JavaScript for <code>head tail rg grep sed wc sort uniq cut tr nl</code>; there is no shell. Private and local addresses are refused, as are huggingface.co pages (as upstream blocks them). Each filter pipeline is limited to 5 seconds.</p>
<p><b>One addition.</b> The system prompt is Ai2's, plus one line giving today's date (the model does not know it and otherwise searches for old news). Add <code>?date=0</code> to the address to remove it.</p>
<p><b>Honest limits.</b> A 4-bit-class model on a free search stack is not the paper's setup: results can be thinner than the reported benchmarks, the free services rate-limit (about 20 page reads a minute, so steps can pause), and answers can be wrong. Check the sources it cites.
The model runs on your device; your search queries and the URLs it opens are sent to DuckDuckGo/Brave and Jina (anonymously, from your browser).</p>
<p id="store"></p>
<button id="wipe" type="button">Delete downloaded model</button>
</details>
</main>
<script type="module" src="main.js"></script>
</body>
</html>