DEV Community

Dhruvil Chauhan
Dhruvil Chauhan

Posted on

I built React components that run Qwen2.5 in the browser via WebGPU – no server, no API key, works offline

Been working on this for a while – open sourced it this week.
 It's a React library called Local Ghost that runs Qwen2.5-Coder-0.5B
 entirely in the browser via WebGPU (WASM fallback for unsupported
 browsers). No server, no API key, no per-query cost.

  Three components:

 SmartDataGrid – natural language filter/sort over any data array.
 Type "show engineers older than 30 sorted by salary" and it generates
 a sandboxed JS filter and executes it locally.

  SmartForm – paste any unstructured text (receipt, email, bio) and the
 model extracts structured JSON to fill form fields.

  SmartAnalytics – describe a chart in plain English, get bar/line/pie/
 scatter rendered instantly from your data.

  Tech: Qwen2.5-Coder-0.5B-Instruct via u/huggingface,
 WebGPU with automatic device-lost hotswap to WASM, 5-min idle VRAM
 purge, IndexedDB query cache, hardened sandbox (nulls window/document/
 fetch/localStorage inside generated code).

 Model downloads once (~300MB), cached in CacheStorage forever.

 npm: u/dhruvil0210
 Demo: https://local-ghost-demo.vercel.app
 Docs: https://local-ghost-docs.vercel.app

Top comments (0)