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.
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.
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.
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.