Private AI in your browser tab. Chat, generate images, search the web, and talk to your documents — running entirely on your own device. No server, no API keys, no data leaving your machine.
LocalMind is a single web page that runs real AI models on your own device. Open the link, pick a model, and start chatting — the model downloads once, caches in your browser, and works offline after that. Your conversations, files, and memory never leave your machine.
It began as a private chatbot and grew into a small AI workbench: chat, image generation, document Q&A, OCR, web research, and voice — all local.
The promise: no server · no API keys · no data leaving your device. The only thing that ever touches the network is a web search — and only when you press the search button.
- 💬 Chat with private local models — eleven to choose from, from a tiny ~140 MB model (or Chrome's own Gemini Nano, a 0-byte download) up to a 27B-class model (Ternary Bonsai 2 27B, ternary 1.75-bit) running entirely in the tab. They reason, write, and code.
- 🎨 Generate images — text-to-image on your GPU, right in the tab.
- 🌫️ Watch text "denoise" — an experimental diffusion-text mode (a different way of generating).
- 🌐 Search the web (optional) — bring your own free search key; answers come back with clickable sources.
- 📄 Chat with your documents — drop in PDFs, Word docs, notes, or a whole folder and ask questions across them. Multilingual search (100+ languages, via a multilingual‑e5 embedder) — ask in one language about documents in another. Flip on sharper answers (Settings) and it double-checks which passages actually answer your question — so replies quote the right part, not just a keyword match. It remembers across sessions.
- 🔎 Extract text from images & PDFs (OCR) — drop in a photo, screenshot, or scanned PDF and get back clean, selectable text or Markdown — tables and formulas included. Runs entirely on your GPU (GLM-OCR); the document never leaves your device. Needs WebGPU (Chrome/Edge); the model downloads once (~1.4 GB), then works offline. You can also point it at the model folder on disk for zero runtime fetch.
- 🖼️ See & hear — some models accept images and audio; voice-to-text works on any model.
- 📷 Point your camera — describe what it sees, or drop in an image and ask about it — on-device captioning & visual Q&A (SmolVLM, WebGPU). Downloads ~0.9 GB once, then works offline.
- 🔊 Voice in and out — read any reply aloud (🔊, Kokoro-82M, English + Hindi), or go fully hands-free (🎙 Voice mode): hold to talk, it transcribes (Moonshine), answers, and reads back. Both run on-device; nothing leaves your machine.
- 🎭 Clone a voice — record 5–10 seconds of a voice, then make it say anything in that voice — zero-shot, entirely in the tab (Chatterbox). A heavy first download (~1.4 GB), then offline. The reference audio never leaves your device.
- 🧠 It remembers — a private, on-device memory you can browse, search, and tidy up.
- 🔌 Use any model — point it at your own Ollama / LM Studio, load a GGUF from a URL, or open a
.ggufstraight from your disk (no download — fully offline). - 📱 Phone to desktop — installable as an app; works offline.
Every feature, in detail → FEATURES.md.
Pick whatever fits your hardware — all three are local, nothing leaves your device:
| How it runs | Best for | |
|---|---|---|
| In your browser | On your GPU via WebGPU — zero setup | The private default; nothing to install |
| In-browser GGUF | A GGUF loaded into the tab (llama.cpp → WebAssembly) — from a URL or a local file on disk | The huge GGUF ecosystem, no setup; runs on CPU even without a GPU |
| Your own server | Point it at Ollama / LM Studio on your machine | Big models (7B–70B+) at full speed |
The same split applies to image generation: Image mode runs a 4B diffusion model in the tab by default, or talks to a local stable-diffusion.cpp server for bigger ones (Qwen-Image 2.1, FLUX.2, Z-Image …). scripts/image-server.sh fetches sd-server for your platform, downloads a stock Qwen-Image 2.1 recipe if you give it no model (~10 GB), and serves on 127.0.0.1:7860; pick Local server in Image mode's model menu and Send. Bring your own files with --dit / --vae / --llm. Nothing leaves the machine either way.
Two GGUF models ship in the picker: LFM2.5 230M (the CPU fallback when there is no WebGPU) and MiniCPM5 2B — OpenBMB's Apache-2.0 2B, which gets a 16K context for long documents. It's a GGUF-only release with no ONNX build, so the in-tab llama.cpp path is the only way to run it in a browser. It calls tools too, in its own XML format rather than the JSON the other models use — LocalMind reads both.
The default model, LFM2.5 230M, runs on a from-scratch WebGPU inference engine — every kernel (matmul, attention, RoPE, RMSNorm, the int4 dequant) is hand-written WGSL, reading the quantized weights directly with no ONNX runtime and no llama.cpp. At ~140 MB it downloads in seconds and decodes at ~1,060 tokens/sec on an M4 Pro — 3.6× the same model on ONNX — so you're chatting almost immediately. Gemma 4 E2B runs on the same approach at ~170 tok/s, 4× its ONNX build, and it scales all the way up to Ternary Bonsai 2 27B, a 27B-parameter model (ternary, ~5.9 GB) running entirely in the tab. All are WebGPU-only.
These engines are ported, largely verbatim, from the open-source webml-community Spaces on Hugging Face — lfm2-webgpu-kernels, gemma-4-webgpu-kernels, and ternary-bonsai-2-webgpu-kernels (the 27B). webml-community is the home of Transformers.js, the in-browser ML library by Xenova (Joshua Lochner) at Hugging Face — the foundation this entire project is built on, and where these WebGPU-kernel engines come from. LocalMind's contribution is the integration: adapting each engine's stream into the shared chat protocol and slotting it in next to the other backends. The Gemma engine also has a standalone home at tylerstraub/gemma4-webgpu. Full credit for Transformers.js and the WGSL kernels goes upstream.
The LFM2 engine is exposed through the DOM-free
inference-worker.js boundary used by LocalMind
itself. Hosts can also use the conservative
host-model-catalog.js and
onnx-inference-worker.js for the supported
Gemma 4 and Qwen3.5 WebGPU paths. The same catalog publishes the on-device Bonsai
FLUX.2-Klein model through
image-inference-worker.js; the worker is
generated from LocalMind's inline image engine by
scripts/extract-image-worker.mjs.
NakliOS vendors these tested artifacts for its shared naklios.ai broker;
model selection, cloud/local endpoint credentials, consent, and app isolation
remain host responsibilities. The worker protocols are documented in
INFERENCE-PROTOCOL.md.
Read-aloud uses Kokoro-82M (Apache-2.0) via kokoro-js; Voice mode transcribes with Moonshine (English) and keeps Whisper-base as the multilingual fallback. All of it runs on WebAssembly so it never competes with the chat model's GPU — and entirely on-device.
Voice cloning (🎭) uses Chatterbox (Resemble AI, MIT) on WebGPU — a first-class Transformers.js model. Live Vision (📷) uses SmolVLM (Hugging Face, Apache-2.0); the optional retrieval reranker uses ms-marco-MiniLM or bge-reranker-v2-m3.
- Open naklitechie.github.io/LocalMind in Chrome or Edge.
- Pick a model — the default is LFM2.5 230M (~140 MB, on the custom WebGPU engine), small and fast so you're chatting in seconds; pick a bigger one anytime for more capability. (On desktop Chrome/Edge where Gemini Nano is already downloaded, LocalMind starts on Nano — zero download.)
- Wait for the one-time download, then chat.
To run it yourself, it's one HTML file with no build step:
python3 -m http.server 8080 # then open http://localhost:8080No dependencies, no backend. (Needs an HTTP server — it won't run from a file:// path.)
Everything runs on your device. Models download from Hugging Face once and cache locally; after that you can go fully offline. There's no account, no telemetry, no backend. Web search is opt-in and uses your key, sent straight from your browser to the provider you chose.
Works in Chrome / Edge 113+ and Firefox 130+ — in-browser models need WebGPU (the "your own server" mode works without it). Safari's WebGPU support isn't there yet.
- 📖 Full feature guide — models, agent tools, memory, web search, batch, sharing, MCP, custom models, and more
- 🛠️ How it works — architecture, the runtimes, workers, and tech stack
- 🧑💻 Developer API — drive the model from your own page (
window.localmind) - ⏱️ Benchmark the engines yourself —
node scripts/bench-engines.mjsdrives Chrome through that API and prints decode tok/s per engine (same model, same prompt, exact token counts) - 🗺️ Roadmap — what's shipped and what's next
- Local-file GGUF loading was suggested by @Mayur88888888 (#6). Thanks!
A growing collection of browser-native tools that run entirely on your device — no server, no data leaving your machine. Full portfolio: naklitechie.github.io.
Built by Chirag Patnaik · MIT licensed · with Claude Code.
