Description
WebLLM is an inference engine that runs large language models directly inside a web browser. It uses WebGPU for hardware acceleration, so text generation runs on the visitor's device without server-side processing. The project's stated goals are lower cost and better privacy, since the client side can run personal models. WebLLM exposes an API that matches OpenAI's, including JSON mode, function calling and streaming chat completions, so code written against that API can be adapted to it. It supports models such as Llama, Phi, Gemma, RedPajama, Mistral and Qwen, and you can integrate custom models compiled to MLC format. You install it with npm or Yarn, or load it from a CDN, and the examples show how to connect it to UI components. It also supports Web Workers. The site has a chat demo, and the code is on GitHub.…
Highlights
- Runs LLMs in the browser on WebGPU
- OpenAI-compatible API with streaming and function calling
- Models such as Llama, Phi, Gemma, Mistral and Qwen
- Custom models in MLC format
- Install from npm, Yarn or a CDN
Ratings & Reviews
No ratings yet
Be the first to rate Web LLM.
People also visit
Web LLM FAQ
What is WebLLM?
An engine that runs language models inside a web browser, using the visitor's GPU through WebGPU.
Is WebLLM free?
The listing marks it free, and the code is published on GitHub.
Does it need a server?
Inference runs in the browser without server-side processing, so no inference server is needed for generation.
Which models can it run?
Models including Llama, Phi, Gemma, RedPajama, Mistral and Qwen, plus custom models you convert to MLC format.
How do I add it to my project?
Install it with npm or Yarn, or load it from a CDN. The examples folder on GitHub shows working setups.
Is the API compatible with OpenAI?
Yes. It offers the OpenAI API with features such as JSON mode, function calling and streaming.
Can I try it first?
The site has a chat demo called Chat with WebLLM.
What are the best Web LLM alternatives?
Popular alternatives to Web LLM include ChatLLM-Web, AgentOp and pooled. See all Web LLM alternatives
