luca-js.soederpop.com/local

AI that runs in the browser. No server, no key, nothing leaves the page.

Six demos built on the Luca web container. Each one is a feature: it loads a model through transformers.js, runs it on your GPU with WebGPU (or WASM), and reports what it is doing through container state and events. The inspector on every page shows that happening live.

Start with search → Source on GitHub checking WebGPU…
container.feature('embeddings')

Semantic search

Embed the real luca describe index in your browser and search it by meaning. The same vectors the CLI uses, computed client-side.

all-MiniLM-L6-v2 · 23 MB
container.feature('localLlm')

Chat

A small instruct model streaming tokens into the container event bus. Stop it mid-sentence. Swap models without reloading.

SmolLM2-360M · 250 MB
container.feature('transcriber')

Speech to text

Whisper, in the page. Record from your microphone or drop an audio file; see how far above real time it runs.

whisper-tiny.en · 40 MB
container.feature('vision')

Zero-shot vision

CLIP scores any image against labels you type. No training. Point your webcam at something and ask what it is.

clip-vit-base-patch32 · 150 MB
transcriber → localLlm → speech

Voice loop

Three features composed: hear, think, speak. The whole conversation stays on your machine.

whisper + SmolLM2 · 290 MB
embeddings.benchmark()

WebGPU vs WASM

The same model on both backends. Load time, warm-up, and texts per second, on your hardware.

all-MiniLM-L6-v2 · 23 MB

How it is built

One containerThe same container object that runs luca on the server runs in the browser. Features, state, and an event bus.
One loadertransformers imports transformers.js from a CDN, picks WebGPU or WASM, and turns per-file download callbacks into state.
One feature per taskembeddings, localLlm, transcriber, vision. Each owns a pipeline and a small state schema.
UI reads statePages subscribe to feature.state.observe() and feature.on('*'). No framework required; React works too.

Every demo is a few lines against the container. This is the chat page, minus the markup:

// luca is the web container, same API as on the server
const llm = container.feature('localLlm', { model: 'HuggingFaceTB/SmolLM2-360M-Instruct' })
llm.on('token', (piece) => output.textContent += piece)
await llm.chat('What is a container?')
llm.state.get('tokensPerSecond')   // decoding speed on your GPU

Models come from the Hugging Face hub and are stored in the browser's Cache API, so the download happens once. After that, every page here works offline. Browser support: WebGPU in Chrome and Edge 113+, Safari 26+. Everything falls back to WASM.

Use it yourself: bun add luca, then import container from 'luca/web'. Run luca describe localLlm for the full API of any feature.