WebLLM

WebLLM

โ˜… 4.2 ๐Ÿ”– 4000 saves ๐Ÿ’ฐ Free GitHub

WebLLM is an open-source, high-performance LLM inference engine that runs large language models entirely inside a web browser, built by the MLC AI team. With more than 19,200 stars on GitHub, it brings GPU-accelerated, private, client-side AI to ordinary web pages: models download once, then generate text locally through WebGPU with nothing sent to a server. The engine powers the popular WebLLM Chat demo and remains in active development in 2026.

Overview

WebLLM builds on the MLC LLM stack and the Apache TVM compiler toolchain to compile models into optimized WebGPU and WebAssembly artifacts. It supports a wide range of open model families โ€” Llama, Qwen, Phi, Gemma, Mistral, and more โ€” in quantized forms that fit in a browser tab. Developers get an OpenAI-compatible chat completions API in JavaScript and TypeScript, streaming output, JSON-mode and grammar-constrained generation, and function-calling style interactions, all with an interface that mirrors server-side SDKs so existing code ports easily.

Key Features

  • Fully client-side LLM inference in the browser via WebGPU acceleration
  • OpenAI-compatible API for chat completions, streaming, and structured output
  • Broad model support across Llama, Qwen, Phi, Gemma, Mistral, and others
  • Quantized model weights that download once and are cached by the browser
  • Built-in web worker and service worker support to keep UIs responsive
  • Streaming generation with grammar constraints and JSON mode
  • Chrome extension and Node.js support for use beyond plain web pages

๐Ÿ’ณ Pricing

WebLLM is completely free and open source under the Apache-2.0 license. Inference runs on your visitors’ hardware, so there are no per-token server costs.

Who Is It For

WebLLM is for web developers who want private, offline-capable, zero-backend-cost AI features in their apps, and for anyone prototyping LLM experiences that must run entirely on the client. It is a strong fit for demos, education tools, and privacy-sensitive products where sending user text to a third-party API is not an option.

๐Ÿš€ Visit WebLLM Official Site

๐Ÿšฉ Report an issue