Running AI writing models and a voice in the browser with WebGPU and WebLLM
I made Scissor Text, 26 free text tools that run in the browser. Fifteen of them use an AI model, and the model runs on your own graphics chip, so the text you type never leaves the tab. There is no server that does t
I made Scissor Text, 26 free text tools that run in the browser. Fifteen of them use an AI model, and the model runs on your own graphics chip, so the text you type never leaves the tab.
There is no server that does the work. The site is static files. The pages are sent with connect-src 'self' in their Content Security Policy, so the page cannot send your text to another site even by mistake.
What is in it
The AI tools are a writer, a grammar checker, a translator, a paraphraser, a summarizer, a humanizer, a tone changer, an email reply writer, a quiz generator and a few smaller ones. The other tools need no model: a word counter, text compare, case converter, find and replace, a JSON formatter and similar. There is also an app with documents kept in the browser's IndexedDB. The site comes in 30 languages.
Three models, one engine
The models run with WebLLM 0.2.87 (Apache-2.0), in a Web Worker on WebGPU. There are three:
- Llama 3.2 1B, about 0.7 GB, the fastest (Llama 3.2 Community License)
- Qwen 3.5 2B, about 1.1 GB, the default (Apache-2.0)
- Qwen 3 4B, about 2.3 GB, the best quality (Apache-2.0)
They are 4-bit builds. Chips without 16-bit floats in shaders (shader-f16) get a 32-bit build of the same model instead.
The model files and the compiled WebGPU libraries are served from the site itself, not from a model hub. The download is the slow part, so it happens once. The models are kept in one shared store for every Scissor tool, so a model downloaded on one site is already there on the next. If the connection drops, the download carries on from the files it already has.
Small graphics chips
Most crash reports came from Windows computers, and they had one number in common: the largest buffer the chip allows, maxBufferSize, was 2 GB or less. So that is the test:
const weak = (a) => !!a && a.limits.maxBufferSize <= 2048 * 1048576;
m.tooBig = (weak(adapter) || lowRam()) && m.mem > 1.6; // GB of graphics memory
On those chips the larger models are marked "may crash on this device", and the smallest one is the default. Even then, some of these chips stop responding partway through a long text. My best guess is the Windows GPU timeout, which resets a chip whose single task runs for more than about two seconds. So on weak chips the text goes to the model in parts of 1,500 characters, and in parts of 700 once the device has lost the chip.
Reloading the page did not help there: the same visitors lost the chip again. Now, if the smallest model fails on such a chip, the page says plainly that this computer cannot run the AI tools, keeps the text, and points to the tools that need no model.
A voice without a server
Text to speech has two engines. The browser's own voices start at once and cost nothing. The natural voice is Kokoro 82M (Apache-2.0), run with kokoro-js and ONNX Runtime Web. It runs in WebAssembly, not on the GPU, so it works on more devices. The quantized model is 92 MB, with 28 English voices. The pages are cross-origin isolated (COOP and COEP headers), which lets the worker use several threads.
The voice runtime includes eSpeak NG for phonemes, which is GPL-3.0. So that bundle runs in its own worker, and it ships with the licence and where to get the source of every part. The voice recorder uses Whisper base (MIT), 76 MB, for transcription, also on the device.
The limits
- The AI tools need WebGPU: a current Chrome or Edge, Safari 26 or later, or Chrome on Android. Elsewhere only the tools without a model work.
- The first use of a model is a download of 0.7 to 2.3 GB. Phones start on the smallest model and get a note to use Wi-Fi.
- These are small models. They are good at rewriting a paragraph and weaker at long or exact work. The smallest one sometimes adds a comment about what it changed.
- The natural voice reads English only. Other languages use the browser's voices.
Try it
Try it: https://text.scissor.studio
It is free, with no account. If your computer has integrated graphics, I would like to know which model worked for you and how long one paragraph took.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.