browser-llm-nexus

An LLM running in this tab, with tool calling. Any ONNX model works — from the Hub, from a host you control, from a zip URL, or from a file on disk. Same four lines either way, and WebGPU or CPU is decided for you. Nothing you type leaves the page.

1 · Where the model comes from — you say, it never guesses

The list holds only models we measured calling tools — press Load and it works. Any repo serving the standard Transformers.js ONNX layout loads too: type its id and the self-check below tells you whether it can call tools on your machine.

device — dtype — model — tool calling —
2 · Your tools — one JS file, edit it live

Every tool the model can call is defined here, in one file. Change it, hit Apply tools, and the model picks it up on the next question — no reload, no rebuild. Each tool(name, description, params, handler) is one callable.

3 · Ask it something that needs a tool

Load a model, then press Ask. The question is prefilled and the tools above are already live — the model has to call one to answer correctly.

The answers are deliberately unguessable — the model can only get them right by calling a tool. Watch the tool log on the right.

What actually happened

Every round: the prompt the model received, its raw output before parsing, and how many tool calls came out. If a small model answers instead of calling, this is where you see it.

Ask something to see the rounds.
4 · Your documents — retrieval, offline
Ask questions about text you paste — no server, nothing uploaded

The library's other half. A small embedding model (~23 MB) indexes what you paste, and the chat model above answers from what was retrieved. Retrieval is markedly more reliable than tool calling at these sizes — measured 10/10 against deliberately near-miss documents.

Load a model first.

Index, then ask. The answers are unguessable codes, so a correct reply proves the right passage was retrieved rather than recalled.

5 · Use it in your app — copy this

This is the exact code for what you have selected above. It updates as you change the source, the backend, or your tools.