Early release, 0.x

LLMs in the browser,
on WebGL 2.

WebGLLM runs LFM3, LFM2.5 and Qwen3.5 on its own WebGL 2 engine, with an OpenAI-compatible API. It works where WebGPU doesn't: Firefox on Android, older iPhones, and everywhere else.

npm install webgllm
import { WebGLLM } from "webgllm"const webgllm = new WebGLLM()const completion = await webgllm.chat.completions.create({  model: "LiquidAI/LFM3-1.7B-GGUF",  messages: [{ role: "user", content: "What is the capital of France?" }]})console.log(completion.choices[0].message.content)

Needs only WebGL 2, no WebGPU and no cross-origin isolation.

  • Chrome
  • Firefox
  • Safari
  • Firefox on Android
  • Older iPhones

Features

Everything you need to ship a local model

A familiar API on top of an engine written for WebGL 2 from the ground up.

OpenAI-compatible

chat.completions.create with streaming, stop sequences, seeds, usage and timings. Unsupported fields throw instead of being ignored.

Keeps the page smooth

Each model runs in its own Web Worker on an OffscreenCanvas, with big passes split into bands, so the page keeps painting while it reads and writes.

Downloads once

Models are stored in the Origin Private File System. Dropped downloads resume, and later page loads reuse the files.

Thinking

reasoning_effort turns thinking on or off, thinking_budget_tokens caps it, and reasoning streams separately from the answer.

Tool calls that work

tools and tool_choice as in OpenAI. Automatic calls are checked against their schema and generated again if they fail.

Structured output

json_schema responses are constrained token by token, so the answer is always valid against the schema.

Several models

Load several models at once under a memory budget picked from the device. The least recently used one is unloaded first.

GGUF and ONNX

Reads regular GGUF and ONNX builds from Hugging Face into the same 4-bit weights. No special web builds needed.

Private by default

Everything runs on the device. Prompts and answers never leave the browser, and there is no server to run.

Models

Small models, loaded straight from Hugging Face

Pass a repository name as the model. 4-bit weights, quantization-aware trained where the vendor ships them.

Liquid AI

LFM3

1.7B

Thinks by default, with a 262K-token context.

  • LiquidAI/LFM3-1.7B-GGUF
  • onnx-community/LFM3-1.7B-ONNX

Qwen

Qwen3.5

2B

Gated DeltaNet layers, with thinking on request.

  • unsloth/Qwen3.5-2B-GGUF
  • onnx-community/Qwen3.5-2B-ONNX

Liquid AI

LFM2.5

350M to 1.2B

Instruct and Thinking at 1.2B, and a 350M model, in GGUF and ONNX.

  • LiquidAI/LFM2.5-1.2B-Instruct-GGUF
  • LiquidAI/LFM2.5-1.2B-Thinking-GGUF
  • LiquidAI/LFM2.5-350M-GGUF

Run your first model in a minute

Install the package, create a WebGLLM and send a chat. The first call downloads the model; every call after that is local.