luca-js.soederpop.com/local
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.
Embed the real luca describe index in your browser and search it by meaning. The same vectors the CLI uses, computed client-side.
A small instruct model streaming tokens into the container event bus. Stop it mid-sentence. Swap models without reloading.
Whisper, in the page. Record from your microphone or drop an audio file; see how far above real time it runs.
CLIP scores any image against labels you type. No training. Point your webcam at something and ask what it is.
Three features composed: hear, think, speak. The whole conversation stays on your machine.
The same model on both backends. Load time, warm-up, and texts per second, on your hardware.
container object that runs luca on the server runs in the browser. Features, state, and an event bus.transformers imports transformers.js from a CDN, picks WebGPU or WASM, and turns per-file download callbacks into state.embeddings, localLlm, transcriber, vision. Each owns a pipeline and a small state schema.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.